TextArea Not Setting size?
Code :
import java.awt.TextArea;
import javax.swing.JFrame;
import javax.swing.JLabel;
public class Class2 extends JFrame{
private TextArea textArea;
private JLabel copyright;
public Class2(){
super("");
copyright = new JLabel("CopyrightŪ 2012");
add(copyright);
textArea = new TextArea("", 15,50, TextArea.SCROLLBARS_VERTICAL_ONLY);
add(textArea);
}
}
Re: TextArea Not Setting size?
Try a JTextArea as opposed to a TextArea. You should avoid mixing Swing and AWT components (see the following as to why: Mixing heavy and light components ).
Re: TextArea Not Setting size?
it matters what the name of you 'private JTextArea' Is? 0.0
Re: TextArea Not Setting size?
Quote:
Originally Posted by
copeg
i changed it to display and it still fills the full screen. :\
Re: TextArea Not Setting size?
Quote:
Originally Posted by
Java Programmer
i changed it to display and it still fills the full screen. :\
I have no clue what you mean by this or your previous post. You've failed to provide your current code, what you mean by 'display', whether you are now using a JTextArea, and anything else you may have done