0

I have this code which saves the value into database from JSpinner

SpinnerListModel monthModel = new SpinnerListModel();
String[] monthStrings = {"1Month","3Month","6Month","1Year"}; //get month names
             monthModel = new SpinnerListModel(monthStrings);
            JSpinner spinner = new JSpinner(monthModel);
statement.setString(28,(String)monthModel.getValue().toString().toUpperCase());

But how to get that value back for Editing?

I tried

spinner.setText((String)monthModel.getValue(),29);

But it says

The method setText(String, int) is undefined for the type JSpinner

How do I get the values from Database?again to JSpinner.

2
Contributors
1
Reply
9
Views
3 Years
Discussion Span
Last Post by Seldar
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.