Answer the question
In order to leave comments, you need to log in
Is it okay to code like this?
There is a code
import javax.swing.JFrame;
import java.awt.Color;
class Main extends JFrame {
public static void main(String[] args) {
JFrame app = new JFrame();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
app.setSize(640, 480);
app.setLocationRelativeTo(null);
app.getContentPane().setBackground(Color.black);
app.setVisible(true);
}
}
import javax.swing.JFrame;
import java.awt.Color;
class Main extends JFrame {
public static void main(String[] args) {
JFrame app = new JFrame();
app.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
app.setSize(640, 480); app.setLocationRelativeTo(null);
app.getContentPane().setBackground(Color.black);
app.setVisible(true);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question