Results 1 to 5 of 5
- 12-16-2010, 11:43 AM #1
Member
- Join Date
- Dec 2010
- Posts
- 3
- Rep Power
- 0
select item from combobox and continue to new window
hi,
we have to make a java program for our exams but we have problems with our combobox.
(We use netbeans 6.8 - gui builder)
We have to select a book we want to read from a combobox ( linked to our access database ). if we select a book and click proceed, we have to view our book in a new gui window, with the tekst of our book.
but we are unable to do this. someone familiar with this?
thanks!
- 12-16-2010, 12:40 PM #2
Ditch the GUI builder.
Can't you just create and show a new JFrame containing whatever you want in the "proceed" button's ActionListener?
- 12-16-2010, 12:47 PM #3
Member
- Join Date
- Dec 2010
- Posts
- 3
- Rep Power
- 0
i don't think so. we aren't that familiar with java, it's a part of our curriculum, we study economy.
i'll try to explain how it works:
in our combox we have several book titles ( these titles can be updated anytime, because people can write new books and delete books - but that's not our part of the programming )
if we select a book title, java has to search the correspondent book title in access and get the text and has to display it on a new window.
i can send you our project if necessary
- 12-16-2010, 01:17 PM #4
What don't you think so?
Okay, so which part of this are you having trouble with? Break your problem up into smaller pieces and tackle one piece at a time.
Absolutely not. Read this: SSCCE.
- 12-16-2010, 03:47 PM #5
Member
- Join Date
- Dec 2010
- Posts
- 3
- Rep Power
- 0
BoekLezen(String numero)
{
initComponents();
this.setTitle("Boek Lezen");
int bknummer = Integer.parseInt(numero);
jLabel1.setText("Welkom, " + bknummer);
}
Instead of Welkom, " + bknummer i want to use bknummer to connect to my database and find corresponding data according to this number.
and then he has to display it on jLabel1
is it possible to use a code you can use within jLabel1.setText(.... ) ?
Similar Threads
-
tootip for each item (comboBox)
By justlynn in forum NetBeansReplies: 5Last Post: 07-29-2010, 03:20 PM -
Add item to combobox permanently
By efozdel in forum New To JavaReplies: 18Last Post: 07-10-2010, 11:30 PM -
Appending and item to a Select List
By Samurai Coder in forum New To JavaReplies: 1Last Post: 12-04-2009, 10:56 PM -
"Cached Item Was Locked" causing Select Statement: Hibernate + EHCache
By cloutierm in forum Advanced JavaReplies: 0Last Post: 03-15-2009, 11:53 PM -
How to retain value in struts 2 using <s:select></s:select> tag
By SaiPrasad@Sella in forum Web FrameworksReplies: 0Last Post: 02-09-2009, 07:23 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks