Computer Quiz

Computer Quiz

Share

14/06/2016

// FRAME INSIDE A FRAME
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
public class A1 extends JFrame implements ActionListener
{
JButton b;
JInternalFrame fr;
A1()
{
setLayout(null);
setSize(800,800);
show();
fr = new JInternalFrame("internal",true,true,true,true);
add(fr);
fr.setSize(300,300);
b=new JButton("click");
add(b);
b.setBounds(30,30,80,30);
b.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
fr.show();
}
public static void main(String[] args)
{
new A1();
}
}

14/06/2016

// IMAGINATION to make GAME for BEGINNERS
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class AA implements KeyListener
{
JFrame fr;
JPanel p1;
JButton b1,b2;
AA()
{
fr=new JFrame();
b1=new JButton("");
fr.add(b1);
b1.setBounds(10,10,20,20);
b1.addKeyListener(this);
fr.setLayout(null);
fr.setSize(500,500);
fr.show();
}
public void keyTyped(KeyEvent e)
{
}
int x=10;
int y=10;
public void keyPressed(KeyEvent e)
{
int c=e.getKeyCode();
if(c==KeyEvent.VK_RIGHT)
{
x+=10;
b1.setBounds(x,y,20,20);
System.out.println(c);
}
else if(c==KeyEvent.VK_LEFT)
{
x-=10;
b1.setBounds(x,y,20,20);
System.out.println(c);
}
else if(c==KeyEvent.VK_UP)
{
y-=10;
b1.setBounds(x,y,20,20);
System.out.println(c);
}
else if(c==KeyEvent.VK_DOWN)
{
y+=10;
b1.setBounds(x,y,20,20);
System.out.println(c);
}
}
public void keyReleased(KeyEvent e)
{
}
public static void main(String atgs[])
{
new AA();
}
}

20/12/2015

main( )
{
int a=printf("\n hello ");
printf("%d",a);
}
A.hello7
B. hello6
C. hello8
D. hello9

05/09/2015

JVM full form ?

Want your business to be the top-listed Computer & Electronics Service in Hyderabad?
Click here to claim your Sponsored Listing.

Telephone

Website

Address


Hyderabad