DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   display the System.out.print msgs (http://www.daniweb.com/forums/thread123581.html)

abdulraqeeb33 May 10th, 2008 7:20 pm
display the System.out.print msgs
 
i have a program running with lot of system.out.println statements.. i want to display this in a javaframe...can anyone tel me the steps to go abt it

freshface001 May 12th, 2008 5:18 am
Re: display the System.out.print msgs
 
The following code is used for creating java frame.
import java.awt.*;
import java.awt.event.*;
class test extends Frame implements WindowListener{
test(){
setTitle("Java Frame");
setSize(400,250);
addWindowListener(this);
setVisible(true);
}

public void windowOpened(WindowEvent e){}

public void windowClosing(WindowEvent e){
System.exit(0);
}

public void windowClosed(WindowEvent e){}

public void windowIconified(WindowEvent e){}

public void windowDeiconified(WindowEvent e){}

public void windowActivated(WindowEvent e){}

public void windowDeactivated(WindowEvent e){}

public static void main(String ars[]){
test t = new test();
}
}
------------------------------------------------------------------
this code is used to print the string in the frame
Graphics g;
g.drawString(variable_name,x,y);
variable_name -> print string
x -> x axis in the frame
y -> y axis in the frame
this code is used to print the string in the frame

alpe gulay May 13th, 2008 12:39 am
Re: display the System.out.print msgs
 
.,ahuh!
i see..


All times are GMT -4. The time now is 10:33 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC