Date Picker GUI Component for Java Swing

I am sure that this question was asked before, but I could not find the answer. I am looking for a Date Picker GUI component that I can drag from the Netbeans IDE. I found below.

So, does anyone know if there is a free Date Picker component for Java for commercial use that we can drag and drop from Netbeans?

+5
source share
2 answers

Netbeans will let you drag any component that extends from JComponent if the class is within the project path.

Once the jar file has been associated with your project, you can expand the contents of the banner (in the node libraries) and drag the class into the form.

I do this for my own components (.java files) all the time.

If this seems cumbersome, you can also add components to the Swing component palette.

  • From the Tools menu, select Palette โ†’ Swing / AWT Components
  • Create a new category for your components.
  • Select "Add from Jar ..."
  • Choose a Jar, make sure the Jar is in a stable location and added to any project that wants to use components!
  • The wizard will check the contents and present you with options that you can add, select the components you need.
  • Select the category you want to add (perhaps the one you just added) and select "Finish"

Expand your category in the palette (make sure you select it in the "Palette Manager"), and all the components

Datepicker

A general, free-to-use component library is SwingLabs, the SwingX library , if you are not trying to sell it, you should be free to use it, you will also have access to the source code, so if you want to add featrues, you can also do this to do. I would suggest that if you do, you should notify them and suggest what changes you can make so that the community can benefit.

JXDatePicker is highly customizable, but you need your hands to be dirty with some code to be the best features ...

+5
source

You can use JDatePicker. Download from this link: http://sourceforge.net/projects/jdatepicker/

It was used as other Swing components:

 UtilDateModel model = new UtilDateModel(); JDatePanelImpl datePanel = new JDatePanelImpl(model); JDatePickerImpl datePicker = new JDatePickerImpl(datePanel); frame.add(datePicker); 
+2
source

Source: https://habr.com/ru/post/1204501/


All Articles