Jump to content

Small question about GUI.


Recommended Posts

Posted (edited)

Hey everyone.

 

I'm trying to get a little bit of margin from the left border of the JFrame. I've created a JPanel.  Which i gave bounds. But it doesn't do what i want. It doesn't get any margin. Anyone who knows?

	        jFrame.setSize(300, 300);
		jFrame.setResizable(false);
		// Add panel
		JPanel jPanel = new JPanel(null);
		jPanel.setBorder(new LineBorder(new Color(0, 0, 0)));
		jPanel.setBounds(10, 10, 100, 100);
		jFrame.add(jPanel);
Edited by Sebastian

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...