textPane = new JTextPane();
textPane.setBounds(337, 33, 290, 198);
textPane.setBackground(Color.LIGHT_GRAY);
textPane.setEditable(false);
textPane.setLayout(new GridLayout());
JScrollPane scrollPane = new JScrollPane(textPane);
scrollPane.setBounds(337, 33, 290, 198);
add(scrollPane);
searchButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
List<MainManagement> sList = new ArrayList<MainManagement>();
MainMngDao mmd = new MainMngDao();
sList = mmd.search();
for(int i = 0; i < sList.size(); i++) {
textPane.setText(sList.get(i).toString());
}
}
});
this is just part of the codes
i used textpane and it can show everything in the list.why?
please give me a pointer
no matter what way i do it , iterator or for() loop, i can acheive it...