I have 4 jcombobox's that need to contain several letters each, when a letter is selected it will display the corresponding text in one of four jtextarea's
I am very new to this, I can generally modify existing code but have never really started from scratch, I got as far as creating the containers and controls but I am stumped as to how to get the comboboxes to work and data to display in the text areas
This code is what I have so far, I am using NetBeans IDE 6.5.1, a screenshot of the interface is included.
This is what it looks like in the IDE
I have it working as an excel spreadsheet, it looks like this;
I'm a little further along, I have the correct selections in the combobox's now. I still need to display text in the ScrollPane / TextArea's that correspond to the selection in the corresponding combobox.
For example, looking at the excel screenshot, the letters in the yellow boxes correspond to the text that is in the 4 boxes below the letters, in the 1st yellow box is the letter "D". In the data fields below, the "D" corresponds to "Duct PIC" so "Duct PIC" is displayed in the chart next to "cable design". This is what I am trying to do.
I need to know where in the code to put the data that is to be looked up and displayed when a value is chosen in the drop down combobox and how to link the combobox to the Scrollpane/TextArea so that the text associated with the combobox choice is displayed in it.
I also updated the code above to reflect the choices in the comboboxes
here's a simple demo of what I think you're trying to do
generally, posting netbeans-generated code is a waste of time.
few, if any, will read it, and unless using netbeans, it cant' be copied into other ide's and run 'as-is'
if you have a problem with a component, don't post all your code, create another program and strip
it down to the problem component, similar to above code i.e. just enough code that can be compiled
and the problem seen.
Michael, yes, that is very similar to what I am looking for, applying this to the code I already have, can you point out which section looks for the letter chosen in the dropdown box and which section outputs the text to the text box? Thanks