Java Swings

June 30,2016

Today i come to know some more components of java swings.

JTable class :

The JTable class is used to display the data on two dimensional tables of cells.

Commonly used Constructors of JTable class:

  • JTable(): creates a table with empty cells.
  • JTable(Object[][] rows, Object[] columns): creates a table with the specified data.

ProgressBar class:

The JProgressBar class is used to display the progress of the task.

Commonly used Constructors of JProgressBar class:

  • JProgressBar(): is used to create a horizontal progress bar but no string text.
  • JProgressBar(int min, int max): is used to create a horizontal progress bar with the specified minimum and maximum value.
  • JProgressBar(int orient): is used to create a progress bar with the specified orientation, it can be either Vertical or Horizontal by using SwingConstants.VERTICAL and SwingConstants.HORIZONTAL constants.
  • JProgressBar(int orient, int min, int max): is used to create a progress bar with the specified orientation, minimum and maximum value.

 

Leave a comment