Home > Net >  How to convert normal java app to java app with GUI or pop up window?
How to convert normal java app to java app with GUI or pop up window?

Time:12-04

I am new in java. I am trying convert simple java app with terminal output to a app with a GUI or UI. I have seen small java applications with little window , like calculator or currency converter.

This is the program I am trying to convert to a GUI app https://github.com/Abhinav-26/Employee-Management-System/blob/master/EmployManagementSystem.java

I have tried to run this app. I am getting the out put in a terminal. (image 1)terminal output

I need a UI to this simple app , like image 2 - example of ui

I am expecting to get a simple java app with UI , like in picture 2. Is there a way to edit existing app ? What should I google / lookup ?

CodePudding user response:

Look into java swing. You can create a JWindow and JFrame with other elements in it like JButton and JTextInput.

https://www.geeksforgeeks.org/java-swing-jwindow-examples/

CodePudding user response:

There are many tutorials on how to build a calculator by using JavaFX.

I'll list just a few:

You can easily find more. If you want to build a standalone application, building a calculator is a better starting point than building some employee management system.

What do I mean by standalone? Unlike a standalone calculator the technical architecture of an employee management system requires some sort of storage. The typical storage-solution would be a database. Then you need some non-UI code to access this storage, I'll call this the server. And finally there will be some UI, I'll call this the client. So the complete application has three tiers: database, server and client. The calculator example has only one tier, everything is included in a single app.

So if you are looking for a tutorial on an employee managment system, you might want to search for tutorials that use a multi-tier-architecture. One common architecture will be a server build with Spring Boot. And there you are – you can easily find tutorials on building an employee managment system with Spring Boot.

Here are two of them but there are many more:

The downside is: You will not be able to use existing code.

So now you have two options:

  1. Learn some Java UI-Framework such as JavaFX or the older Java Swing.
  2. Learn how to build a more complex Java application that has at least some sort of client and some sort of server. Spring Boot is a good starting point for this.
  •  Tags:  
  • java
  • Related