Axis Labels

Reply

Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Axis Labels

 
0
  #1
Feb 3rd, 2005
Hey guys n girls, I have two arrays (one for x and one for y axis) which contain labels i would like to display on a graph. How do you recommend i do this?

I was thinking multiple JLabels, spread out depending on the quantity. But If theres a better of way without creating multiple Jabels then that would be better. Maybe hashtable similar to the slider label creation process?
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Axis Labels

 
0
  #2
Feb 4th, 2005
I wonder if this would work: Create one array with all the values you need, then create a gridlayout with the certain number of rows and columns you need and then append them to the container set to the grid layout
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Axis Labels

 
0
  #3
Feb 4th, 2005
Hi everyone,

Read the labels into an array and then use the graphics object to paint it on the specified object. Do not forget to valite and repaint the component on which you painted the labels.

Richard West
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 89
Reputation: MrScruff is an unknown quantity at this point 
Solved Threads: 0
MrScruff's Avatar
MrScruff MrScruff is offline Offline
Junior Poster in Training

Re: Axis Labels

 
0
  #4
Feb 5th, 2005
Ive actually just created a border layout with the graph in the center, Y axis (panel with gridLayout) to west and x axis (same as Y) south. Then created 5 labels for each y/x panel which i have placed a range of values from some arrays. Its taken some tweaking but it kinda works.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC