How can I make the Jpanel to fill the remaining space remaining inside another panel?

I started out with Swing a few days ago and I was trying to make a UI for a text editor like the one I’ve attached below Sample UI This might be a stupid question but I’ve made the toolbar and added a border but when I am trying to add the drawing pad it’s… Read More How can I make the Jpanel to fill the remaining space remaining inside another panel?

else if statement java gui wont execute

I have been trying to make a java GUI distance converter. My else if statement won’t execute, only the first if statement execute. Does anyone know why i wont executed? Below is my coding and the output. import javax.swing.*; import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.event.*; public class DistanceCalculator implements ActionListener { private JFrame frame; private… Read More else if statement java gui wont execute