Solved

Applet: right align y coordinate labels

Posted on 1998-12-16
3
314 Views
Last Modified: 2006-11-17
I have a graphic image http://www.clearsail.net/~robjay/Graph10Applet.htm
I would like to right align the y coordinate labels - I am
somewhat familiar with the Label.RIGHT method but I'm unsure
how to implement.
0
Comment
Question by:robjay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
heyhey_ earned 50 total points
ID: 1229624
i don't know what is your current code -
- do you use some LayoutManager,
- do you use Label components
  or
- you paint everything yourself ...

in case you use Label components, here is the appropriate code

labelXY = new Label("X,Y :",Label.RIGHT);
labelXY.setBounds(440,400,60,24); // will align the label at position 500
add(labelXY);

if you paint the text in your paint method, you'll have to make all computations yourself.

if you still have problems, please post the appropriate code.

hope this helps
  heyhey
0
 

Author Comment

by:robjay
ID: 1229625
Actually I paint everything - could you briefly explain the "computations" a bit.  I assume I can still utilize the labelXY = new Label("X,Y :",Label.RIGHT); code?
Thanks!
0
 

Author Comment

by:robjay
ID: 1229626
Actually I paint everything - could you briefly explain the "computations" a bit.  I assume I can still utilize the labelXY = new Label("X,Y :",Label.RIGHT); code?
Thanks!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question