why that do not work ? I want a scoll bar in the JTextAreaCode://...
myTextArea1 = new JTextArea();
myTextArea1.reshape (0,100,500,200);
c.add (myTextArea1);
c.add (new JScrollPane(myTextArea1));
//...
Printable View
why that do not work ? I want a scoll bar in the JTextAreaCode://...
myTextArea1 = new JTextArea();
myTextArea1.reshape (0,100,500,200);
c.add (myTextArea1);
c.add (new JScrollPane(myTextArea1));
//...
I have searched in my book and in sun.com and I can not see what's wrong !
Hi
A small part of a code I normaly use to ScrollPane.
****
jScrollPane2.setVerticalScrollBarPolicy
(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jScrollPane2.setBorder(BorderFactory.createTitledBorder("Tekst"));
jScrollPane2.setBounds(new Rectangle(0, 108, 634, 156));
jScrollPane2.getViewport().add(jTextArea2, null);
this.getContentPane().add(jScrollPane2, null);
jTextArea2.setWrapStyleWord(true);
jTextArea2.setLineWrap(true);
jTextArea2.setBorder(BorderFactory.createLineBorder(Color.black, 1));
****
I think is the ways I declare the Container beacuse I know one way to be able to reshape but I can not use ScrollBar and an other way that I can not use reshape but I can use srollbar... that weird.:confused: