Hack Forums
[Java] Help with Class that will output to any way that the user wants to output. - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Java] Help with Class that will output to any way that the user wants to output. (/showthread.php?tid=4948267)



Help with Class that will output to any way that the user wants to output. - KingAroan_temp - Aug 13, 2015

I am trying to create a simple class that will output information for the user, but I don't know if there is a way that I can get an output that does just use system.out.println in case the user wants to print it to a window or something like that.

Any help would be appreciated


* - Assault - Aug 13, 2015

use events? pass the string directly to the user


* - MrOrang - Aug 14, 2015

Uhmmm I dont really get what you want.


* - WildeThing - Aug 14, 2015

CLI message:
PHP Code

<?php 
System
.out.println("lol"); 

GUI message:
PHP Code

<?php 
// you can set other options for this like info message, error message etc.
// this is swing
JOptionPane.showMessageDialog(null, "lol", "lolz");