Results 1 to 3 of 3

Thread: [RESOLVED] Maximizing a form in Netbeans

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Resolved [RESOLVED] Maximizing a form in Netbeans

    Hi

    How do you maximize a form in netbeans?
    (If a window is maximized it means you cannnot drag that window/form/pane)

    Thanks in Advance

  2. #2
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: Maximizing a form in Netbeans

    Code:
    	public static void main(String[] args)
    	{
    		final JFrame frame = new JFrame();
    		JButton btn = new JButton("Click");
    		btn.addActionListener(new ActionListener()
    		{
    
    			@Override
    			public void actionPerformed(ActionEvent e)
    			{
    				frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
    			}
    
    		});
    		frame.add(btn, BorderLayout.NORTH);
    		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    		frame.setSize(200, 200);
    		frame.setVisible(true);
    	}
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2006
    Posts
    275

    Re: [RESOLVED] Maximizing a form in Netbeans

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width