// Create the frame
String title = " Title";
J frame = new J(title);

// Create a component to add to the frame
JComponent comp = new JTextArea();

// Add the component to the frame's content pane;
// by default, the content pane has a border layout
frame.getContentPane().add(comp, BorderLayout.CENTER);

// Show the frame
int width = 300;
int height = 300;
frame.setSize(width, height);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.