Category: Java

How to Create a Circle JPanel in Netbeans Java Swing

Add this Code with in your class class RoundedPanel extends JPanel { private Color backgroundColor; private int cornerRadius = 15; public RoundedPanel(LayoutManager layout, int radius) { super(layout); cornerRadius = radius; } public RoundedPanel(LayoutManager layout, int radius, Color bgColor) { super(layout); cornerRadius = radius; backgroundColor = bgColor; } public RoundedPanel(int radius) { super(); cornerRadius = radius; } public RoundedPanel(int radius, Color...

How to Calculate Two JTextField’s Value in Java Swing/AWT/SWT/Windows Builder

Here i’ll be discussing with different Calculation type in JTextfield, and also we will discuss how to only accept numbers from  JTextField. So let us assume two textfield example like JTextField feild1 and JTextField feild2. In Calculation of the textfield’s we must have basic understanding of wrapper classes, something like converting String to int and vice versa. Let’s look at...