Forums Register Login

interface updating

+Pie Number of slices to send: Send
Sorry about the other two threads, It simply cut off the contents halfway, it wouldn't display the rest!

I'll try and express my problem more concisely.

I have invented a new component Histogram which extends JComponent.

I have an array[] of histogram objects.

I'm displaying a array[0] in a pane on my GUI, and I have a method update() which puts a new, different Histogram object in array[0]. I want the GUI to automatically reflect this change by displaying the new array[0] component instead of the old one.

How do I do this?

Thanks!
+Pie Number of slices to send: Send
Formulated even better:

Is there any way to have a component (1) that just holds a reference to another component (2) so that I can change 2 to something else and called component1.setRef(another component) and thereby add component1 to the interface once and change the displayed component by calling component1.setRef(another component)?
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 626 times.
Similar Threads
interface updating problem
Problem with displaying an histogramm with Cewolf
Errors with array and JTextArea and ComboBox
How to increase/decrease brightness of an image with the use of JSlider slider or JScrollBar
Drawing a Histogram ( I know its been covered and I have read through those posts)
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:30:48.