BoxLayout refuses to honor preferred size of JButton
I have been working on a small project that is supposed to simulate a gambling game. Unfortunately, I ran into some odd issues while working with BoxLayout . To the best of my knowledge, LayoutManager s usually honor any component's preferred size. However, in the below code, BoxLayout does not. Here is my code thus far: import java.awt.*; import javax.swing.*; public class Main { public static void main(String[] args) { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("Suit-Up"); frame.setContentPane(makeGUI()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame