173k views
0 votes
Given a JFrame variable named frame, write a statement that makes the frame visible.

User Vinhboy
by
6.0k points

1 Answer

6 votes

Answer:

import javax.swing.JFrame;

public class Main {

public static void main(String[] args) {

// Create a frame

JFrame frame = new JFrame("Swing");

// Display the frame

frame.setVisible(true);

}

}

Step-by-step explanation:

User Vetsin
by
6.0k points