Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Java, 1. What are some advantages of GUI over console programming? 2. What ar

ID: 3808359 • Letter: I

Question

In Java,

1. What are some advantages of GUI over console programming?

2. What are the four JFrame constructors? What do each do?

   3. How can you customize the appearance of a JFrame?

   4. How do you change the text of a JLabel? Provide an example.

   5. How do you change the font of a JLabel?

   6. Describe the FlowLayout manager.

   7. What are some of the decisions you must make when extending a JFrame?

   8. How do you modify whether or not a JTextField can be edited?

   9. Provide an example of an event-driven program.

Explanation / Answer

1.Advantages of GUI include the ability of quickly interacting and realizing with the images and thier ease of use whereas console programming is a computer text based interface which takes time to code and it is only via text based.

2.JFrame(): Constructs a new frame that is initially invisible

JFrame(GraphicsConfiguration gc): Creates a Frame in the specified GraphicsConfiguration of a screen device and a blank title.

JFrame(String Title):Creates a new, initially invisible Frame with the specified title

JFrame(String title, GraphicsConfiguration gc): Creates a JFrame with the specified title and the specified GraphicsConfiguration of a screen device

3.new project>>right click on new application>>new Frame>>new FrameForm..

4.To set text you use

5.To set font you use

label = new JLabel("A label");

label.setFont(new Font("Serif", Font.PLAIN, 16));

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote