public void createWindow2(){
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setPreferredSize(new Dimension(400, 500));
setLocationRelativeTo(null);
setContentPane(new JLabel(new ImageIcon("src\\resources\\registerBg.png")));
setResizable(false);
setVisible(false);
double size[][] = {{TableLayout.FILL,70,10,200,TableLayout.FILL}, //COLUNAS
{TableLayout.FILL,30,5,30,5,30,5,30,5,30,5,30,82.5,30,82.5}}; //LINHAS
setLayout(new TableLayout(size));
(...)
//Botoes JPanel
buts = new JPanel();
double size2[][] = {{TableLayout.FILL,100,5,100,TableLayout.FILL}, //COLUNAS
{TableLayout.FILL}}; //LINHAS
buts.setLayout(new TableLayout(size2));
add(buts,"0,4,13,13");
//Continuar
continuar = new JButton("Continuar");
buts.add(continuar,"1,0");
//Voltar
voltar =new JButton("Voltar");
buts.add(voltar,"3,0");
这是此框架运行的图像
http://oi42.tinypic.com/m83cko.jpg
我花了很多时间试图找出为什么按钮不出现,但我没有找到原因,有人可以帮我解决这个问题吗?