java - How to put a JButton with an image on top of ...
2016-4-11 · JButton j1=new JButton('a'); j1.setLayout(new BorderLayout()); j1.setBackground(Color.red); add(j1); JButton j2=new JButton('b'); j2.setBackground(Color.yellow); j1.add('Center', j2); Although generally not to be used, the null layout is a solution here if you want to specify specific location and size:
Get Price