Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt with buttons

 
paulo cs
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, this is my first post and my english is bad, so I need learn english and Java,eheheheh!!

How can I do to put my buttons in anywhere? Example: Bellow my code


The created buttons stay in a default position, but I'd like to put in anywhere, but not the application. Did you understand?
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

You are going to need to use a Layout Manager, or at least set values on the default layout manager. You can take a look at the Laying Out Components Within a Container lesson in the Sun Java Tutorial. The book Head First Java has a great couple of chapters on Swing and using Layout Managers.

I hope that helps.
 
Campbell Ritchie
Marshal
Posts: 52636
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch

We shall be moving to new software next week. We shall be closed for several hours on 3rd January.

This sort of question is usually discussed on the Swing forum, so I shall move you there.
 
Get out of my mind! Look! A tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!