4. Fill in the blanks so that this program displays a Frame: import java.awt." public class microGUI{ public static void

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

4. Fill in the blanks so that this program displays a Frame: import java.awt." public class microGUI{ public static void

Post by answerhappygod »

4 Fill In The Blanks So That This Program Displays A Frame Import Java Awt Public Class Microgui Public Static Void 1
4 Fill In The Blanks So That This Program Displays A Frame Import Java Awt Public Class Microgui Public Static Void 1 (33.03 KiB) Viewed 35 times
4. Fill in the blanks so that this program displays a Frame: import java.awt." public class microGUI{ public static void main(String all I JFrame frm= new _( 150, 100); frm true); 1) frm a. Panel,setSize, paint b. Frame, setVisible, setSite crm, setVisible, seton dJFrame, setSize, setVisible 5. The following code should produce the output in Fig. 1. Something went wrong. Modify the code to show the display in Fig. 2. package package import java.awt." import javax.swing." public class Swing Test public static void main(String[] args) JFrame frame = new JFrame("Test Frame"); frame.setDefaultCloseOperation Frame.EXIT_ON_CLOSE); frame.pack: frame.setSize(new Dimension[300,2001): frame.setLocation, 0); frame.setLocation(250, 250): Container contentPane = frame gerContentPanel: frame.setVisible(false): contentPane.setBackgroundColor.red): frame.setLayout(new Border Layout(). frame.add(new JButton("Click"). BorderLayout SOUTH frame.add(new JButton("Do not Click), BorderLayout. NORTH): } Fig. 1 Fie 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply