Documente Academic
Documente Profesional
Documente Cultură
*;
import java.awt.*;
class javarunner
{
p_buton.add( butn_1 ) ;
p_buton.add( butn_2 ) ;
p_buton.add( butn_3 ) ;
p_exe.add( lab_name_exe ) ;
p_exe.add( tf_name_exe ) ;
p_class.add( lab_name_class ) ;
p_class.add( tf_name_class ) ;
p_wrapper.add(p_buton) ;
p_wrapper.add(p_exe) ;
p_wrapper.add(p_class) ;
MyFrame mf;
mf.show ();
BasicFileIO.bfio();
}
}
{
//-------------------------------------//
// start of GO //
//-------------------------------------//
if ("GO".equals (obj))
{ BasicFileIO.bfio ();
}
//-------------------------------------//
// end of GO //
//-------------------------------------//
if ("EXIT".equals (obj))
{ System.exit(0) ;
}
//-------------------------------------//
//-------------------------------------//
// check if About //
//-------------------------------------//
if ("ABOUT".equals (obj))
{
MyFrame mf ;
mf = new MyFrame() ;
MyDialog d;
MyWindow w;
Button btnOKDialog;
Button btnOKWindow;
//-------------------------------------//
// end of About //
//-------------------------------------//
return (true);
//-------------------------------------------------------------------//
} // <======== end of public boolean action (Event evt, Object obj ) //
//-------------------------------------------------------------------//
class BasicFileIO
{
public static void bfio()
{
File fOut;
FileOutputStream fosOut;
PrintStream ps ;
int iChar;
String exename = javarunner.tf_name_exe.getText();
String classname = javarunner.tf_name_class.getText();
int exeLength = exename.length();
int classLength = classname.length();
int i =0;
int[] ntmp= { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
try
{
fOut = new File (".", exename +".exe");
fosOut = new FileOutputStream (fOut);
ps = new PrintStream(fosOut);
ps.println( classname );
catch (Exception e)
{
System.out.println ("Error processing files: " + e);
}
}
}
//--------------------------------------------------------
//
switch (evt.id)
{
case Event.WINDOW_DESTROY: // Close from System Menu
this.dispose ();
break;
case Event.ACTION_EVENT:
if ("Click to close".equals (evt.arg)) // Dialog's OK Button
{
this.dispose ();
}
break;
}
return (super.handleEvent (evt));
}
}
//
//----------------------------
//
switch (evt.id)
{
case Event.WINDOW_DESTROY: // Close from System Menu
this.dispose ();
break;
case Event.ACTION_EVENT:
if ("Click to close".equals (evt.arg)) // Window's OK Button
{
this.dispose ();
}
break;
}
return (super.handleEvent (evt));
}
}