Help me !!!
Hi guys !!!
I have problem in using JTabbedPane.I have three textarea in the JTabbedPane.But if i use the getText...i can retrieve only one textarea value.But i want to retrieve all the values from the three textarea at a time.
I'm using the like this ...i have mention some of my program code
// JTabbedPane declaration.
final JTabbedPane tabbedPane = new JTabbedPane();
//Add the Tab in the tabbedpane.
Component panel1 = makeTextPanel("Patient Records");
tabbedPane.addTab("Patient Records", icon, panel1);
tabbedPane.setSelectedIndex(0);
Component panel2 = makeTextPanel("Patient Lab Reports");
tabbedPane.addTab("Lab Reports", icon, panel2);
//method to call makeTextPanel
protected Component makeTextPanel(String text) {
JPanel panel = new JPanel(false);
JTextArea filler = new JTextArea(text);
panel.setLayout(new GridLayout(1, 1));
panel.add(filler);
return panel;
}
I have a button...but i dont know how to retrieve the value.
JButton but = new JButton("Click Here!!!");
but.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae){
int count = tabbedPane.getTabCount();
for(int i=0;i<count;i++) {
JOptionPane.showMessageDialog(null,tabbedPane. ?(what should i give here ...so that i can retrieve the values from the JTextArea);
}
}
});>

