Hi there I was wondering if any kind soul could help me out, I have a class which when run outputs a lot of output strings etc. I have a second class which runs a simple GUI with a JButton to open another GUI, in that new GUI I am trying to get the output from my class file to appear in a JTextArea/Field something like that....could anyone point me in the right direction? Many thanks..
Now you modify the print() and print(int, int , int) methods to return the String that is to be printed instead of writing it out to console. Once that is done then you can call the cube.print() below CubeArray cube = CubeArray();
and get the string that is needed. Do not understand the whole idea though
We usually have only one top–level container, eg, JFrame, at a time in a gui application. To show data you can use the convenience class methods in JOptionPane (shown below) or make up a JDialog and show/dispose it as needed.
That seems to work rather well Craig, cheers for the help! So is the output for the 2nd GUI in the public String getValues method? I'm going to mess about with it a bit, because I need it to output the reverse binary addresses from the original class matched to the random colours (like the original output did). That should be simple enough should it not? Thanks for your help chaps.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop