My Program read a XML file and Display the textArea according to the location it read.. which goes something like:
text=new JTextArea("",10,5);
text.setBounds(newPos[2*total1],newPos[2*total1+1],200,200);
panel.add(text);
I ADDED in the Scrollpane:
text=new JTextArea("",10,5);
text.setText("Item");
// text.setLineWrap(true);
text.setBounds(newPos[2*total1],newPos[2*total1+1],200,200);
// JScrollPane p= new JScrollPane(text);
text.setEditable(false);
// p.setPreferredSize(new Dimension(450, 110));
// panel.add(p, BorderLayout.SOUTH);
panel.add(text);
2 problem Faced... Firstly the lineWrap mess up all my location setting and Second is my Scrollpane code Wrong in any place?
text=new JTextArea("",10,5);
text.setBounds(newPos[2*total1],newPos[2*total1+1],200,200);
panel.add(text);
I ADDED in the Scrollpane:
text=new JTextArea("",10,5);
text.setText("Item");
// text.setLineWrap(true);
text.setBounds(newPos[2*total1],newPos[2*total1+1],200,200);
// JScrollPane p= new JScrollPane(text);
text.setEditable(false);
// p.setPreferredSize(new Dimension(450, 110));
// panel.add(p, BorderLayout.SOUTH);
panel.add(text);
2 problem Faced... Firstly the lineWrap mess up all my location setting and Second is my Scrollpane code Wrong in any place?