I want to show the same as the input type number of HTML5 but on Swing. This image illustrate what I want to do:
and the number is going from 0 to 999 for example
How can I make the same using Java Swing?
public class MyFrame(){
SpinnerModel spinnerModel = new SpinnerNumberModel(0,0,999,1);
JSpinner anlist = new JSpinner(spinnerModel);
JPanel panel1 = new JPanel();
public MyFrame(){
panel1.add(anlist);
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.