123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
--------------------------------------------------------------------------------

Window control in Java

--------------------------------------------------------------------------------

Description : Here window will open as a result of executing program.This program gives a lot of detals of frame,panel etc in java



import java.awt.*;
import java.applet.*;
public class MyWindow2 extends Applet {
Frame window;
Button open,close;
public void init()
{
open=new Button("Open Window");
add(open);
close=new Button("Colse Window");
add(close);
window=new BaseFrame1("A Pop Up Window");
window.resize(150,150);
MenuBar mbar=new MenuBar();
Menu myMenu=new Menu("File");
myMenu.add(new MenuItem("New"));
myMenu.add(new MenuItem("Open"));
myMenu.add(new MenuItem("Save"));
mbar.add(myMenu);
window.setMenuBar(mbar);
}
public boolean action(Event evt,Object arg)
{
if(evt.target instanceof Button)
{
String label=(String)arg;
if(label.equals("Open Window"))
{
if(!window.isShowing())
window.show();
}
else
{
if(window.isShowing())
window.hide();
}
return true;
}
else
return false;
}
}
 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG