Dá uma olhada no tipo de Layout que vocês está usando, as vezes acontece isso mesmo. Se for o caso, use o Absoluto ou o Livre.
caike_chb
Nicolas Fernandes
Eu estou dando os meus primeiros passos em java usando o netbeans 6.9.1, então por favor não repare na simplicidade do código =D
/* * To change this template, choose Tools | Templates * and open the template in the editor. *//* * jfrm_principal.java * * Created on 27/10/2010, 09:50:31 */packageformularios;importjavax.swing.JFrame;/** * * @author Carlos */publicclassjfrm_principalextendsjavax.swing.JFrame{/** Creates new form jfrm_principal */publicjfrm_principal(){initComponents();}/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */@SuppressWarnings("unchecked")// <editor-fold defaultstate="collapsed" desc="Generated Code"> privatevoidinitComponents(){jmnb_principal=newjavax.swing.JMenuBar();jmnu_cadastros=newjavax.swing.JMenu();jmnuItem_clientes=newjavax.swing.JMenuItem();jMenu2=newjavax.swing.JMenu();setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);jmnu_cadastros.setText("Cadastro");jmnuItem_clientes.setText("Clientes");jmnuItem_clientes.addActionListener(newjava.awt.event.ActionListener(){publicvoidactionPerformed(java.awt.event.ActionEventevt){jmnuItem_clientesActionPerformed(evt);}});jmnu_cadastros.add(jmnuItem_clientes);jmnb_principal.add(jmnu_cadastros);jMenu2.setText("Edit");jmnb_principal.add(jMenu2);setJMenuBar(jmnb_principal);javax.swing.GroupLayoutlayout=newjavax.swing.GroupLayout(getContentPane());getContentPane().setLayout(layout);layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,883,Short.MAX_VALUE));layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0,497,Short.MAX_VALUE));pack();}// </editor-fold> privatevoidjmnuItem_clientesActionPerformed(java.awt.event.ActionEventevt){newjfrm_clientes().setVisible(true);}/** * @param args the command line arguments */publicstaticvoidmain(Stringargs[]){java.awt.EventQueue.invokeLater(newRunnable(){publicvoidrun(){JFramejfrm_principal=newJFrame();/* jfrm_principal.setExtendedState(jfrm_principal.getExtendedState()|JFrame.MAXIMIZED_BOTH); Mesmo trocando não funcionou... */jfrm_principal.setExtendedState(JFrame.MAXIMIZED_BOTH);jfrm_principal.setVisible(true);}});}// Variables declaration - do not modify privatejavax.swing.JMenujMenu2;privatejavax.swing.JMenuBarjmnb_principal;privatejavax.swing.JMenuItemjmnuItem_clientes;privatejavax.swing.JMenujmnu_cadastros;// End of variables declaration }
Edenilton Fr?s
Kara não funcionou não, mas vlw, vou continuar tentando, se alguém souber de como abrir o form maximizado agradeço!
vlw
caike_chb
LarissaNepomuceno
estou usando o netbeans 6.9.1, não faço nem idéia de como ver o layout