What is java GUI ?
GUI stands for Graphical User Interface, a time period used not best in Java however in all programming languages that guide the improvement of GUIs. A software’s graphical consumer interface affords an easy-to-use visual display to the person.
Source code for user order of the project.
int id,quentity;
double price;
String item;
public void refreshTable(){
try {
String query = "select * from Food_Price";
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
table.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
}
public void refreshTable2(){
try {
String query = "select * from Drinks_Price";
PreparedStatement pst = con.prepareStatement(query);
ResultSet rs = pst.executeQuery();
table_Drinks.setModel(DbUtils.resultSetToTableModel(rs));
} catch (Exception e) {
e.printStackTrace();
}
}
This code is use for refreshing the table.
Be First to Comment