is any body knows a code to make a java text frame.,,please i need help
Your question is lacking but...
JFrame frame = new JFrame();
Container cp = frame.getContentPane();
cp.add(new JTextArea());
frame.pack();
frame.setVisible(true);
^ would be the simplest example.
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container cp = frame.getContentPane();
JTextArea txt = new JTextArea();
JScrollPane scroll = new JScrollPane(txt);
scroll.setPreferredSize(new Dimension(200, 200));
cp.add(scroll);
frame.pack();
frame.setVisible(true);
^ enables scrolling
JTextField tf = new JTextField("Should Do your homework first");
JTextArea ta = new JTextArea("Is this homework, \n the queestion is not clear");
精彩评论