Hi!
I need a bit of help here. I started a new project and i need to know how to set position of JLabels(strings). Can I just set pixels or use Int x = 300, Int Y = 400??
I realy need help. I will be thankful for all the help.
ZixCo
0
Newbie Poster
Recommended Answers
Jump to PostYou can set the layout manager for the container to
null
, then usesetBounds
to set the size and position of your label in pixels.
However, if you do it's going to look very silly when someone runs your code on a screen with "retina" resolution, or even just on …
Jump to PostYou set a LayoutManager for each JFrame's content pane or JPanel, it then handles the exact positioning of its contents, based on your specifications. Please see the tutorial I linked in my previous post.
All 5 Replies
ZixCo
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
ZixCo
0
Newbie Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
ZixCo
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.