Why JTextArea
not showing in GUI
?
public class AddMovie extends JTextField {
static JFrame frame;
private JLabel description;
JTextArea movieDescription;
public JPanel createContentPane() throws IOException
{
JPanel totalGUI = new JPanel();
totalGUI.setLayout(null);
totalGUI.setBackground(Color.WHITE);
description = new JLabel("Description ");
description.setLocation(15,285);
description.setSize(120, 25);
description.setFont(new java.awt.Font("Tahoma", 0, 12));
movieDescription=new JTextArea();
movieDescription.setLocation(15,320);
movieDescription.setSize(420, 110);
JScrollPane scrollPane = new JScrollPane(movieDescription);
totalGUI.add(description);
totalGUI.add(movieDescription);
totalGUI.add(cancel);
totalGUI.add(scrollPane);
return totalGUI;
}
static void createAndShowGUI() throws IOException
{
JFrame.setDefaultLookAndFeelDecorated(true);
frame = new JFrame("New Movie");
//Create and set up the content pane.
AddMovie demo = new AddMovie();
frame.setContentPane(demo.createContentPane());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(515, 520);
frame.setLocation(480,120);
frame.setVisible(true);
}
public void setVisible(boolean b) {
// TODO Auto-generated method stub
}
}