Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My problem is that i want each selected combobox appear in jtable when the person click on add button My code here only choose one,

My problem is that i want each selected combobox appear in jtable when the person click on add button
My code here only choose one, once i choose another book from combobox it remove the old from jtable and add the new one.
How should i fix it?
image text in transcribed
public void actionperformed(java.awt.event.ActionEvent evt) i string n=( string) combosox. getselecteditem(); string sql="sgLecr book_id, Titlo, Drice From Book table WHBRk Book table.titlo=" "+n+",n Dreparedstatoment st=con.preparestatement (sq1); rsmt.oxecuteguery (sq1) Resultset rs=st, executequery (sqq1); table. setmodel (Dbutils. resultsetToTableModel(rs)) 1 catch (SQLException x ) x printstackTrace ()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

Students also viewed these Databases questions

Question

Use the Euclidean algorithm to find the GCD. 35, 105

Answered: 1 week ago

Question

Describe alternative training and development delivery systems.

Answered: 1 week ago

Question

Summarize the learning organization idea as a strategic mind-set.

Answered: 1 week ago