I am making a simple GUI in swing. I have a JInternalFrame and in this frame I have added two button but their size is beyond my expectation. I want to see these button in my size but their size is not getting changed. I have also use setSized() funtionj. Here the output-
this is my code
/*making of sign in headerFrame and all its dimension and size and location are initialized here*/
 JInternalFrame signframe=new JInternalFrame("signframe", false, false, false, false);
 signframe.setLayout(new GridLayout(3, 1,5,6));
 signframe.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
 signframe.getRootPane().setWindowDecorationStyle(JRootPane.NONE);
 BasicInternalFrameTitlePane signtitlePane =
         (BasicInternalFrameTitlePane) ((BasicInternalFrameUI) signframe.getUI()).getNorthPane();  
 signframe.remove(signtitlePane);
 signframe.setBorder(null);
 signframe.setBackground(Color.ORANGE);
 signframe.setSize(250, 150);
 //end of the sign frame
 //location of the sign frame in the screen
 signframe.setLocation(30,60);
 //make the gui for the Sign frame
 //make sign button for the sign frame
 JButton signbutton=new JButton("SIGN IN");
 signbutton.setSize(20, 20);
 JButton signbutton2=new JButton("SIGN IN2");
 signbutton.setSize(20, 20);
 signbutton.resize(30, 40);
 signbutton2.setPreferredSize(getSize());
 //add action lister to the sign in button
 signbutton.addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        // TODO Auto-generated method stub
    }
});
 //adding the signbutton to signframe
 signframe.add(signbutton);
 signframe.add(signbutton2);
 //making the sign frame visible
 signframe.setVisible(true);
 //adding the sign frame into the destop pane
 desktoppane.add(signframe);
 //should be in the ends
 c.add(desktoppane);
 setVisible(true);
 
    