Java Exception Try-Catch

Java Exception

When running Java codes, many errors can occur; coding errors made by the programmer, wrong input, and other unforseeable things.

When an error occurs, Java will normally stop the program and generate an error message. The technical term for this is : Java will throw an exception (error).

Java try-catch

Continue reading Java Exception Try-Catch

JOptionPane in Java

JOptionPane in Java is used to provide dialog boxes such as message dialog box, input dialog box and confirm dialog box. These dialog boxes are used to get input from user or just to display information.

there are 3 common methods of the JOptionPane which is :

  • showMessageDialog()
  • showInputDialog()
  • showConfirmDialog()
Continue reading JOptionPane in Java

Create A JTree In Java Eclipse

The Java JTree class is usually used to display a tree structured data or a hierarchical structured data.

Of course in a hierarchical structured data, it has a “head” or a top data or a “root”. And in JTree it has a “root node” at the top of the tree data. That is usually the parent for all nodes inside the tree.

Continue reading Create A JTree In Java Eclipse