JFrame изменяет размеры

При компиляции кода в IDE GUI имеет корректный размер, но если экспортировать jar файл, а после его открыть , то размеры JFrame куда-то уползают... Почему?

Main

import javax.swing.*;

public class Main {

    public static void main(String[] args) {

        JFrame frame = new JFrame();
        frame.setSize(490,405);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setLocationRelativeTo(null);
        frame.setResizable(false);

        JLayeredPane panel = new JLayeredPane();
        panel.setLayout(null);
        frame.add(panel);

        JTextArea input_text = new JTextArea();
        input_text.setBounds(5,5,475, 150);
        input_text.setWrapStyleWord(true);
        input_text.setLineWrap(true);
        panel.add(input_text,1,0);

        JTextArea output_text = new JTextArea();
        output_text.setBounds(5,220,475, 150);
        output_text.setWrapStyleWord(true);
        output_text.setEditable(false);
        output_text.setLineWrap(true);
        panel.add(output_text,1,0);

        JButton crypt_button = new JButton("Encrypt");
        crypt_button.setBounds(10,163,100,50);
        panel.add(crypt_button,1,0);

        JButton uncrypt_button = new JButton("Uncrypt");
        uncrypt_button.setBounds(375,163,100,50);
        panel.add(uncrypt_button,1,0);

        JButton clipboard_copy_input = new JButton("Copy");
        clipboard_copy_input.setBounds(405,135,75,20);
        panel.add(clipboard_copy_input,2,0);

        JButton clipboard_copy_output = new JButton("Copy");
        clipboard_copy_output.setBounds(405,350,75,20);
        panel.add(clipboard_copy_output,2,0);

        JButton clear = new JButton("Clear");
        clear.setBounds(296,163,80,50);
        panel.add(clear,1,0);
 }
}

Ответы (0 шт):