This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

populate data in text fields after selecting combo box list

Ferry Lukito
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have problem with populating text fields upon selecting item in the combo box. I have 2 class, 1 to handle the GUI and the other, Controller to handle the database. Controller constructor takes the GUI as an input.
This is what I did in simplified version:
------------- GUI Class ------------
JComboBox combobox = new JComboBox();

public void comboboxListener(ActionListener al)

GUI.comboboxListener(new combolistener());

class combolistener implements ActionListener{
public void actionPerformed(ActionEvent ae){
machines help you to do more, but experience less. Experience this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!