Practical solutions

Java Howtos How-To Guides

Solve the problem. Keep building. Collection of Java how-to articles

Find the answer you need

Browse practical solutions, grouped by the task you're working on.

__COUNT__ entries on this page

How to Clear the Canvas in JavaFXThis tutorial will see how we can clear canvas in JavaFX. How to Create Label Text Color in Java With JavaFx LibraryThis tutorial will show how we can color label text in Java with JavaFx Library. How to Calculate the Euclidean Distance in JavaThis article will help you to calculate the distance between two points using Java. How to Use Java FFMPEG to Convert Files From One Format to AnotherThis article demonstrates how to use Java wrapper and Java runtime to run FFMPEG to convert files from one format to another. How to Escape HTML in JavaThis article explains about how can we escape HTML characters and symbols in Java. And to do so we can use the Apache commons-text and StringEscapeUtils.escapeHtml4(str) methods to escape HTML symbols and characters in Java. How to Create Canvas Using Java SwingThis article demonstrates how to make canvas using Java Swing and draw shapes on it. How to Center Text in a Pane in JavaFXThis tutorial demonstrates how to center text in a pane in JavaFX. How to Rotate Text in JavaFXThis tutorial demonstrates how to rotate text in JavaFX. How to Ignore Exception in JavaException handling mechanism is one of the core concepts of every programming language. Java is one of programming languages that allows us to ignore exceptions (abnormal condition) in run time with the different try-catch blocks. How to Format Text Field Number Format in JavaFXThis tutorial demonstrates how to create a number format text field in JavaFX. How to Create Square in JavaFXThis tutorial tackles how to create a square in JavaFX. How to Create Java Do-While Loop With User InputThe do-while loop is also known as exit control loop and this loop in java allows you to run the body of the loop at least once before checking the condition because it is sometimes desirable to execute the body of a loop once even if the condition of the loop is false. How to Evaluate a Mathematical Expression in JavaIn Java programming language, you can evaluate arithmetic expressions using stack. Stack is a data structure mechanism that works on the First In Last Out (FILO) or Last In First Out (LIFO), and we will be using it to evaluate an arithmetic expression. How to Create JavaFX Message BoxThis article demonstrates how to create JavaFX confirmation, information, warning, and error message box. How to Clear Text Field in JavaJava is a general-purpose pure object-oriented computer programming language that is specifically designed to have as few implementation dependencies as possible. We can build graphical user interfaces with Java. How to Fix Error: JavaFX FXML Load ExceptionThis article shows how to solve the JavaFX FXML load exception. This also highlights the reasons causing this exception. How to Fix Unsupported Major Minor Version Error in JavaThis tutorial demonstrates how to solve the unsupported major minor version error in Java. How to Fix Error:Java: Javactask: Source Release 1.8 Requires Target Release 1.8This tutorial demonstrates how to solve the javactask source release error in IntelliJ IDE. How to Fix Java.IO.StreamCorruptedException: Invalid Stream HeaderThis tutorial demonstrates how to solve the java.io.streamcorruptedexception invalid stream header error in Java. How to Fix Exception in Thread AWT-EventQueue-0 java.lang.NullPointerExceptionThis tutorial demonstrates how to solve the exception in thread awt-eventqueue-0 java.lang.nullpointerexception error in Java. How to Fix the Warning: Uses or Overrides a Deprecated API in JavaThis tutorial describes the reason for a warning that says uses or overrides a deprecated API, also illustrates how to fix this. How to Fix the Error: Could Not Find Java SE Runtime EnvironmentThis tutorial demonstrates how to solve the could not find Java SE runtime environment error in Java. How to Fix Java.Net.SocketException: Network Is UnreachableThis tutorial provides the solution for java.net.SocketException: Network is unreachable exception. Also, highlights some possible reasons for this exception. How to Fix Error: Unable to Instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClientThis tutorial demonstrates how to solve the java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient in Java.