Problemas ao redimencionar a tela e alterar a fonte de botões

Eu estou fazendo um programa de interfacec gráfica para ler os dados do usuário no JFrame e armazena-los em um arquivo " .txt ". Mas, durante esse processo eu decidi adicionar uma função para o usuário auternar o tamanho da tela entre < normal e maximizado >

TELA%20NORMAL

Eu queria saber como fazer um calculo (ou regra de tres) para definir o tamanho da fonte em cada botao quando a tela estivesse no modo normal e quando estivesse no modo maximizado.

O mais próximo da solução que cheguei foi descobrir a largura do JPanel em que eles estão posicionados e fazer uma regra de tres pra descobrir qual será a fonte quando a tela estiver maximizada.

AQUI ESTÁ O CÓDIGO: (CONTEM CAMINHO DE IMAGES)

package main;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Frame;
import java.awt.GraphicsEnvironment;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.MatteBorder;

import gradients.Direction;
import gradients.GradientPanel;
import internal.CreateClientInternal;
import internal.DeleteClientInternal;
import internal.ReadClientInternal;
import internal.UpdateClientInternal;

public class Home extends JFrame {

private static final long serialVersionUID = 1L;
private GradientPanel contentPane;
private boolean maximized = false;
private int xx = 0;
private int xy = 0;
private Dimension size;
private JPanel southBar;
private JButton createClient;
private JButton readClient;
private JButton updateClient;
private JButton deleteClient;
private JPanel panelMaximize;
private JLabel maximize;
private Color topBarColor;
private JPanel movebleBar;
private Dimension ScreenMinimizedSize;
private int minSouthBarHeight;
private int maxSouthBarHeight;

public Home(boolean ScreenStartMaximized) {
	// INSTANCE IMAGES
	ImageIcon icon = new ImageIcon(Home.class.getResource("/images/icon.png"));
	
	ImageIcon minimize_image = new ImageIcon(Home.class.getResource("/images/unselected_minimize.png"));
	ImageIcon maximize_image = new ImageIcon(Home.class.getResource("/images/unselected_maximize.png"));
	ImageIcon close_image = new ImageIcon(Home.class.getResource("/images/unselected_close.png"));
	ImageIcon restore_image = new ImageIcon(Home.class.getResource("/images/unselected_restore.png"));

	ImageIcon selected_minimize = new ImageIcon(Home.class.getResource("/images/selected_minimize.png"));
	ImageIcon unselected_minimize = new ImageIcon(Home.class.getResource("/images/unselected_minimize.png"));

	ImageIcon selected_maximize = new ImageIcon(Home.class.getResource("/images/selected_maximize.png"));
	ImageIcon unselected_maximize = new ImageIcon(Home.class.getResource("/images/unselected_maximize.png"));

	ImageIcon selected_close = new ImageIcon(Home.class.getResource("/images/selected_close.png"));
	ImageIcon unselected_close = new ImageIcon(Home.class.getResource("/images/unselected_close.png"));

	ImageIcon selected_restore = new ImageIcon(Home.class.getResource("/images/selected_restore.png"));
	ImageIcon unselected_restore = new ImageIcon(Home.class.getResource("/images/unselected_restore.png"));

	// TOP BAR COLOR, SIZE & MINIMUM SIZE FOR SCREEN
	topBarColor = Color.GRAY;
	size = new Dimension(32, 32);
	ScreenMinimizedSize = new Dimension(450, 300);

	if (ScreenStartMaximized) {
		maximizeScreen();
	} else {
		restoreScreen();
	}
	
	// CONFIGURATIONS OF THE FRAME
	setUndecorated(true);
	setIconImage(icon.getImage().getScaledInstance(icon.getIconWidth(), icon.getIconHeight(), Image.SCALE_DEFAULT));
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	// CONFIGURATIONS OF THE CONTET PANEL
	contentPane = new GradientPanel(Color.BLACK, Color.BLACK, Direction.vertical);
	contentPane.setBorder(new MatteBorder(10, 10, 10, 10, (Color) new Color(218, 165, 32)));

	contentPane.setLayout(new BorderLayout());
	setContentPane(contentPane);
	

	movebleBar = new JPanel();
	movebleBar.setBackground(topBarColor);
	contentPane.add(movebleBar, BorderLayout.NORTH);
	movebleBar.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 3));

	southBar = new GradientPanel(new Color(0, 204, 255), new Color(0, 128, 128), Direction.vertical);
	southBar.setForeground(new Color(0, 0, 0));
	southBar.setLayout(new GridLayout(0, 1, 0, 0));
	southBar.setBackground(new Color(0, 0, 0, 95));

	contentPane.add(southBar, BorderLayout.CENTER);

	// BUTTONS
	configureButtonMinimize(minimize_image, selected_minimize, unselected_minimize);
	configureButtonMaximize(maximize_image, selected_maximize, unselected_maximize, movebleBar, restore_image,
			selected_restore, unselected_restore);
	configureButtonClose(close_image, selected_close, unselected_close);

	// NORTH BAR
	configureMovebleBar(movebleBar);

	// SOUTH BAR
	createClient = new JButton("1 - Cadastrar");
	createClient.setOpaque(false);
	readClient = new JButton("2 - Listar");
	updateClient = new JButton("3 - Atualizar");
	deleteClient = new JButton("4 - Remover");
	deleteClient.setRolloverEnabled(false);

	// CONFIGURE BUTTONS
	configureButtons(ScreenStartMaximized);
	configureListennerCreate();
	configureListennerRead();
	configureListennerUpdate();
	configureListennerDelete();

	// SCREEN COMMANDS
	configureListennerScreen(restore_image, maximize_image);
}

private void configureListennerScreen(ImageIcon restore_image, ImageIcon maximize_image) {
	addKeyListener(new KeyAdapter() {
		@Override
		public void keyPressed(KeyEvent e) {
			// System.out.println(e.getKeyChar() + " | " + e.getKeyCode());
			int key = e.getKeyCode();
			if (key == 27) {
				System.exit(0);
			}
			if (key == 107) {
				if (!maximized) {
					maximizeScreen();
					increaseFont();
					maximize.setIcon(new ImageIcon(restore_image.getImage().getScaledInstance(
							panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
					maximized = true;
				} else {
					restoreScreen();
					decreaseFont();
					maximize.setIcon(new ImageIcon(maximize_image.getImage().getScaledInstance(
							panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
					maximized = false;
				}
			}
			if (key == 109) {
				minimizeScreen();
			}
			if (key == 97) {
				CreateClientInternal cci = null;
				if (maximized) {
					cci = new CreateClientInternal(true);
				} else {
					cci = new CreateClientInternal(false);
				}
				cci.setVisible(true);
				Home.this.dispose();
			}
			if (key == 98) {
				new ReadClientInternal();
				Home.this.dispose();
			}
			if (key == 99) {
				new UpdateClientInternal();
				Home.this.dispose();
			}
			if (key == 100) {
				DeleteClientInternal dci = new DeleteClientInternal();
				if (maximized) {
					Rectangle r = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
					dci.setBounds(0, 0, (int) r.getWidth(), (int) r.getHeight());
				}
				Home.this.dispose();
			}
		}
	});
}

private void configureListennerDelete() {
	deleteClient.addMouseListener(new MouseAdapter() {
		public void mousePressed(MouseEvent e) {
			new DeleteClientInternal().setVisible(true);
			Home.this.dispose();
		}
	});
}

private void configureListennerUpdate() {
	updateClient.addMouseListener(new MouseAdapter() {
		public void mousePressed(MouseEvent e) {
			new UpdateClientInternal().setVisible(true);
			Home.this.dispose();
		}
	});
}

private void configureListennerRead() {
	readClient.addMouseListener(new MouseAdapter() {
		public void mousePressed(MouseEvent e) {
			new ReadClientInternal().setVisible(true);
			Home.this.dispose();
		}
	});
}

private void configureListennerCreate() {
	createClient.addMouseListener(new MouseAdapter() {
		public void mousePressed(MouseEvent e) {
			CreateClientInternal cci = null;
			if (maximized) {
				cci = new CreateClientInternal(true);
			} else {
				cci = new CreateClientInternal(false);
			}
			cci.setVisible(true);
			Home.this.dispose();
		}
	});
}

private void configureButtons(boolean screenStartMaximized) {
	createClient.setHorizontalAlignment(SwingConstants.CENTER);
	createClient.setAlignmentX(Component.LEFT_ALIGNMENT);
	createClient.setBorder(null);
	createClient.setForeground(Color.WHITE);
	createClient.setBackground(Color.WHITE);
	createClient.setFocusable(false);

	readClient.setHorizontalAlignment(SwingConstants.CENTER);
	readClient.setOpaque(false);
	readClient.setBorder(null);
	readClient.setForeground(Color.WHITE);
	readClient.setBackground(Color.WHITE);
	readClient.setFocusable(false);

	updateClient.setHorizontalAlignment(SwingConstants.CENTER);
	updateClient.setOpaque(false);
	updateClient.setBorder(null);
	updateClient.setForeground(Color.WHITE);
	updateClient.setBackground(Color.WHITE);
	updateClient.setFocusable(false);

	deleteClient.setHorizontalAlignment(SwingConstants.CENTER);
	deleteClient.setOpaque(false);
	deleteClient.setBorder(null);
	deleteClient.setForeground(Color.WHITE);
	deleteClient.setBackground(Color.WHITE);
	deleteClient.setFocusable(false);

	// ADD THE BUTTONS INTO PANEL
	southBar.add(createClient);
	southBar.add(readClient);
	southBar.add(updateClient);
	southBar.add(deleteClient);
	
	if (screenStartMaximized) {
		increaseFont();
	} else {
		decreaseFont();
	}
}

private void configureMovebleBar(JPanel barraMovel) {
	barraMovel.addMouseListener(new MouseAdapter() {

		@Override
		public void mousePressed(MouseEvent e) {
			if (!maximized) {
				xx = e.getX();
				xy = e.getY();
			}
		}
	});
	barraMovel.addMouseMotionListener(new MouseMotionAdapter() {
		@Override
		public void mouseDragged(MouseEvent e) {
			if (!maximized) {
				int x = e.getXOnScreen();
				int y = e.getYOnScreen();
				Home.this.setLocation(x - xx, y - xy);
			}
		}
	});
}

private void configureButtonClose(ImageIcon close_image, ImageIcon selected_close, ImageIcon unselected_close) {
	JPanel panelClose = new JPanel();
	panelClose.setAlignmentX(Component.RIGHT_ALIGNMENT);
	panelClose.setSize(size);
	panelClose.setBackground(topBarColor);
	panelClose.setLayout(new GridBagLayout());
	movebleBar.add(panelClose);

	JLabel close = new JLabel();
	close.setIcon(new ImageIcon(close_image.getImage().getScaledInstance(panelClose.getWidth(),
			panelClose.getHeight(), Image.SCALE_DEFAULT)));
	panelClose.add(close);
	close.setForeground(Color.RED);

	panelClose.addMouseListener(new MouseAdapter() {
		@Override
		public void mouseClicked(MouseEvent e) {
			System.exit(0);
		}

		public void mouseEntered(MouseEvent e) {
			close.setIcon(new ImageIcon(selected_close.getImage().getScaledInstance(panelClose.getWidth(),
					panelClose.getHeight(), Image.SCALE_DEFAULT)));
		}

		public void mouseExited(MouseEvent e) {
			close.setIcon(new ImageIcon(unselected_close.getImage().getScaledInstance(panelClose.getWidth(),
					panelClose.getHeight(), Image.SCALE_DEFAULT)));
		}
	});
}

private void configureButtonMaximize(ImageIcon maximize_image, ImageIcon selected_maximize,
		ImageIcon unselected_maximize, JPanel movebleBar, ImageIcon restore_image, ImageIcon selected_restore,
		ImageIcon unselected_restore) {
	panelMaximize = new JPanel();
	panelMaximize.setBackground(topBarColor);
	panelMaximize.setSize(size);
	panelMaximize.setLayout(new GridBagLayout());
	movebleBar.add(panelMaximize);

	maximize = new JLabel();
	maximize.setIcon(new ImageIcon(maximize_image.getImage().getScaledInstance(panelMaximize.getWidth(),
			panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
	maximize.setForeground(Color.RED);
	panelMaximize.add(maximize);

	// LISTENNER
	panelMaximize.addMouseListener(new MouseAdapter() {

		public void mousePressed(MouseEvent e) {
			if (!maximized) {
				maximizeScreen();
				increaseFont();
				maximize.setIcon(new ImageIcon(restore_image.getImage().getScaledInstance(panelMaximize.getWidth(),
						panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
				maximized = true;
			} else {
				restoreScreen();
				decreaseFont();
				maximize.setIcon(new ImageIcon(maximize_image.getImage().getScaledInstance(panelMaximize.getWidth(),
						panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
				maximized = false;
			}
		}

		public void mouseEntered(MouseEvent e) {
			if (!maximized) {
				maximize.setIcon(new ImageIcon(selected_maximize.getImage().getScaledInstance(
						panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
			} else {
				maximize.setIcon(new ImageIcon(selected_restore.getImage().getScaledInstance(
						panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
			}
		}

		public void mouseExited(MouseEvent e) {
			if (!maximized) {
				maximize.setIcon(new ImageIcon(unselected_maximize.getImage().getScaledInstance(
						panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));
			} else {
				maximize.setIcon(new ImageIcon(unselected_restore.getImage().getScaledInstance(
						panelMaximize.getWidth(), panelMaximize.getHeight(), Image.SCALE_DEFAULT)));

			}
		}
	});

}

private void configureButtonMinimize(ImageIcon minimize_image, ImageIcon selected_minimize,
		ImageIcon unselected_minimize) {
	JPanel panelMinimize = new JPanel();
	panelMinimize.setBackground(topBarColor);
	panelMinimize.setSize(size);
	panelMinimize.setLayout(new GridBagLayout());
	movebleBar.add(panelMinimize);

	JLabel minimize = new JLabel();
	minimize.setIcon(new ImageIcon(minimize_image.getImage().getScaledInstance(panelMinimize.getWidth(),
			panelMinimize.getHeight(), Image.SCALE_DEFAULT)));
	minimize.setForeground(Color.RED);
	panelMinimize.add(minimize);

	panelMinimize.addMouseListener(new MouseAdapter() {
		@Override
		public void mouseClicked(MouseEvent e) {
			Home.this.setExtendedState(Frame.ICONIFIED);
		}

		public void mouseEntered(MouseEvent e) {
			minimize.setIcon(new ImageIcon(selected_minimize.getImage().getScaledInstance(panelMinimize.getWidth(),
					panelMinimize.getHeight(), Image.SCALE_DEFAULT)));
		}

		public void mouseExited(MouseEvent e) {
			minimize.setIcon(new ImageIcon(unselected_minimize.getImage()
					.getScaledInstance(panelMinimize.getWidth(), panelMinimize.getHeight(), Image.SCALE_DEFAULT)));
		}

	});
}

private void maximizeScreen() {
	Rectangle r = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
	setBounds(0, 0, (int) r.getWidth(), (int) r.getHeight());
	maximized = true;
}

private void restoreScreen() {
	setSize(ScreenMinimizedSize);
	setLocationRelativeTo(null);
}

private void minimizeScreen() {
	Home.this.setExtendedState(Frame.ICONIFIED);
}

public void increaseFont() {
	createClient.setFont(new Font("Century Gothic", Font.BOLD, 26));
	readClient.setFont(new Font("Century Gothic", Font.BOLD, 26));
	updateClient.setFont(new Font("Century Gothic", Font.BOLD, 26));
	deleteClient.setFont(new Font("Century Gothic", Font.BOLD, 26));
}

public void decreaseFont() {

// /*
// * 670 - 26
// * 242 - x
// * x = (242 * 26) / 670
// * */
// int fontSize = createClient.getFont().getSize();
// int x = (minSouthBarHeight * fontSize) / southBar.getComponentCount();
// System.out.println(x);

	createClient.setFont(new Font("Century Gothic", Font.BOLD, 18));
	readClient.setFont(new Font("Century Gothic", Font.BOLD, 18));
	updateClient.setFont(new Font("Century Gothic", Font.BOLD, 18));
	deleteClient.setFont(new Font("Century Gothic", Font.BOLD, 18));
}

}