Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Printing to new window dilemma

$
0
0
Here's the problem.

I have a few different print lines (like a 'for' loop), of which I would like to make display in a new pop-up window. However, I'm not sure how to make it print to the new window.


Here is an example of a section which prints:
/**Handle ShowAll button*/
    private class ShowAll implements ActionListener{
        public void actionPerformed(ActionEvent e){
            for(int c=0; c<counter; c++){
                System.out.println("\n==============================\n" + libarr.get(c));
            }
            System.out.println("\n==============================\n");
        }//action performed
    }//class


And this is what I have for a pop-up window:
JOptionPane.showMessageDialog(null, "Hello " + testingSt);


How do I make the final output from the for loop then display in a new window (like the code just above).


I have searched around, and I can't find anything that would help.

Some help would be great!
Thanks,
~kosmro~

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>