Hi
can you please help me on this
how i can change jcombobox in my frame to jtextfield when i click on next button..
then i get the data from database in jtextfield...
thx

Recommended Answers

All 4 Replies

your question makes little to no sense. either you don't need the jcombobox, and should just remove it, or you need them both. at that point there are two options:
1. they are on different components, so, you'll just navigate from one frame (or panel) to another
2. they are on the same component (panel, jframe, ..) and then you can switch between them by setting the visibility of them.

Hi
good solution ..only i have in my frame the add update delete button and near them i have next,pev,..and in my frame i have a combobox when i click on next i want the value from database displayed in the combobox ..

so ... what is stopping you?
in your actionperformed method, you can write/call the code to update the contents of your JComboBox. just do a search in the idea of:
getCitiesWhereCountryIs(String country){/*call to db*/}
and update the JComboBox with the results of this query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.