Help with GUI ?
I have this GUI which has two textboxes and Listbox. I want to have a browse button connected with the first textbox and then I want the submit button connected with the second textbox. That when user hits submit whatever is in second textbox is read and action is done accordingly. Where should I change my code to make this a reality.
I'm a C# developer and is stuck with this Java project....
import javax.swing.*;
publicclass Graphicsextends JFrame
{
JPanel panel;
JLabel nameLabel;
JLabel callLabel;
JLabel calledNumberLabel;
JTextField fileField;
JTextField numberField;
JList list;
publicvoid createGUI()
{
panel=new JPanel();
panel.setLayout(null);
panel.setBounds(0,0,500,500);
nameLabel=new JLabel("Name of data file?");
nameLabel.setBounds(40,20,150,20);
callLabel=new JLabel("Calling number?");
callLabel.setBounds(40,50,150,20);
calledNumberLabel=new JLabel("Called numbers");
calledNumberLabel.setBounds(140,100,150,20);
fileField=new JTextField();
fileField.setBounds(200,20,150,20);
numberField=new JTextField();
numberField.setBounds(200,50,150,20);
String[] data ={"one","two","three","four"};
list =new JList(data);
JScrollPane scrollPane =new JScrollPane(list);
scrollPane.setBounds(50,130,300,100);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
scrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
panel.add(nameLabel);
panel.add(callLabel);
panel.add(calledNumberLabel);
panel.add(fileField);
panel.add(numberField);
panel.add(scrollPane);
this.getContentPane().add(panel);
}
}
Really appreciate for all the help...

