Quantcast
Channel: Java Tips Weblog » Classes
Browsing latest articles
Browse All 14 View Live

Image may be NSFW.
Clik here to view.

Table Column Manager

When using a JTable the user has some control over the view of the columns in the table. The columns can be resized and they can be reordered. One feature that is not supported is the ability to hide...

View Article



Image may be NSFW.
Clik here to view.

Drag Layout

We have been taught that you should always use a layout manager to layout components on a container. But what about the times when you want the ability to randomly position components on a panel by...

View Article

Image may be NSFW.
Clik here to view.

Combo Box With Hidden Data

Typically a JComboBox is used to display a list of strings. There may be times when you need the items in the combo box to contain extra data so that you can do additional processing once an item is...

View Article

Image may be NSFW.
Clik here to view.

Smart Scrolling

There may be times when you have a component in a JScrollPane and data is dynamically added to this component. Normally, you would like the viewport to scroll to the bottom automatically as new data is...

View Article

Image may be NSFW.
Clik here to view.

Playing With Shapes

Custom painting, as we all know, should be done by overriding the paintComponent(…) method of a Swing component. Chances are that when you first start to experiment with custom painting you will use...

View Article


Image may be NSFW.
Clik here to view.

Combo Box With Custom Renderer

There may be times when you have a custom Object that you want to add to a JComboBox. Adding the Object to the ComboBoxModel is no problem, however getting the appropriate text to display in the combo...

View Article

Image may be NSFW.
Clik here to view.

Month View

MonthView is a composite of a YearMonthSpinner and a tabular calendar display of the selected month.  The table can be navigated with the arrow keys, and the month can be changed by the mouse scroll...

View Article

Image may be NSFW.
Clik here to view.

Temporal Spinners

JSpinner was designed to work with Dates, Lists or Numbers.  With the introduction of a new Date/Time API in Java 8, wouldn’t it be great to be able to create date or time spinners that use the new...

View Article


Image may be NSFW.
Clik here to view.

Year Month Spinner

YearMonthSpinner is a composite of two Temporal spinners, one for the month and the other for the year, used to select a java.time.YearMonth.  For ease of use, the spinner buttons are located towards...

View Article


Image may be NSFW.
Clik here to view.

Local Date Combo

LocalDateCombo is a Swing date picker for selecting a java.time.LocalDate from a drop-down MonthView.  As with MonthView, the no-arg constructor creates a LocalDateCombo set to the current date, with...

View Article
Browsing latest articles
Browse All 14 View Live




Latest Images