0% found this document useful (0 votes)
17 views39 pages

Java Unit 4 & 5 Programs

Uploaded by

rajkirannaidu123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views39 pages

Java Unit 4 & 5 Programs

Uploaded by

rajkirannaidu123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

program on bu on component

import [Link].*;

import [Link].*;

class ColorsFrame extends Frame implements Ac onListener

Bu on bl, b2, b3;

ColorsFrame()

[Link](true);

[Link](500,500);

[Link]( "Colors Frame ");

[Link](new FlowLayout());

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

[Link](0);

});

bl=new Bu on("Red");

b2=new Bu on("Green");

b3=new Bu on("Blue");

[Link] onListener(this);

[Link] onListener(this);

[Link] onListener(this);

[Link]([Link]);

[Link]([Link]);

[Link]([Link]);
[Link](bl);

[Link](b2);

[Link](b3);

public void ac onPerformed(Ac onEvent ae)

String label=[Link] onCommand();

if([Link]("Red"))

[Link]([Link]);

if([Link]("Green"))

[Link]([Link]);

if([Link]("Blue"))

[Link]([Link]);

class Bu onEx

public sta c void main(String[] args)

ColorsFrame cf=new ColorsFrame();

2. programs on text field and textarea.

import [Link].*;
import [Link].*;

class UserFrame extends Frame implements Ac onListener{

Label l1, l2, l3, l4, l5;

TextField l, 2, 3, 4;

TextArea ta;

Bu on b;

String uname = " ";

String upwd = " ";

String uemail = " ";

String umobile = " ";

String uaddr = " ";

UserFrame() {

[Link](true);

[Link](1000, 1000);

[Link]("User Frame");

[Link]([Link]);

[Link](new FlowLayout());

// Adding components to the frame

[Link](new WindowAdapter() {

public void windowClosing(WindowEvent we) {

[Link](0);

});
l1 = new Label("User Name");

l2 = new Label("Password");

l3 = new Label("User Email");

l4 = new Label("User Mobile");

l5 = new Label("User Address");

l = new TextField(20);

2 = new TextField(20);

[Link]('*');

3 = new TextField(20);

4 = new TextField(20);

ta = new TextArea(3, 15);

b = new Bu on("Registra on");

[Link] onListener(this);

Font f = new Font("arial", [Link], 15);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](l1);[Link]( l);

[Link](l2);[Link]( 2);

[Link](l3);[Link]( 3);
[Link](l4);[Link]( 4);

[Link](l5);[Link](ta);

[Link](b);

public void ac onPerformed(Ac onEvent ae) {

uname = [Link]();

upwd = [Link]();

uemail = [Link]();

umobile = [Link]();

uaddr = [Link]();

repaint();

public void paint(Graphics g) {

Font f = new Font("arial", [Link], 20);

[Link](f);

[Link]("User Name :" + uname, 50, 250);

[Link]("Password :" + upwd, 50, 300);

[Link]("User Email :" + uemail, 50, 350);

[Link]("User Mobile :" + umobile, 50, 400);

[Link]("User Address :" + uaddr, 50, 450);

public class TextFieldEx

public sta c void main(String[] args)

UserFrame uf=new UserFrame();

}}
[Link] on checkbox and radio bu on

import [Link].*;

import [Link].*;

class UserFrame extends Frame implements ItemListener

Label l1, l2;

Checkbox cb1, cb2, cb3, cb4, cb5;

String uqual=" ";

String ugender= " ";

UserFrame()

[Link](true);

[Link](500,500);

[Link]("Check Box Example");

[Link]([Link]);

[Link](new FlowLayout());

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

[Link](0);

});

l1=new Label(" User Qualifica ons");

l2=new Label("User Gender");

cb1=new Checkbox( "BSC",null, false);

cb2=new Checkbox("MCA" ,null, false);

cb3=new Checkbox("phd",null, false);

CheckboxGroup cg=new CheckboxGroup();


cb4=new Checkbox("Male",cg, false);

cb5=new Checkbox("Female",cg, false);

[Link](this);

[Link](this);

[Link](this);

[Link](this);

[Link](this);

Font f=new Font("arial", [Link], 15);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](f);

[Link](l1);

[Link](cb1);

[Link](cb2);

[Link](cb3);

[Link](l2);

[Link](cb4);

[Link](cb5);

public void itemStateChanged(ItemEvent ie)

if([Link]() == true)

uqual=uqual+[Link]()+" ";
}

if([Link]()==true)

uqual=uqual+[Link]()+" ";

if([Link]() == true)

uqual=uqual+[Link]()+" ";

if([Link]()==true)

ugender=[Link]();

if([Link]() == true)

ugender=[Link]();

repaint();

public void paint(Graphics g)

Font f=new Font("arial",[Link], 30);

[Link](f);

[Link]("QuaIifica ons :"+uqual, 50, 300);

[Link]("Gender :"+ugender, 50, 350);

uqual="";

public class CheckBoxEx

{
public sta c void main(String[] args)

UserFrame uf=new UserFrame();

[Link] on list and choice.

import [Link].*;

import [Link].*;

class UserFrame extends Frame implements ItemListener

Label l1,l2;

List l;

Choice ch;

String utech="";

String uprof="";

UserFrame()

[Link](true);

[Link](500,500);

[Link]("List Example");

[Link]([Link]);

[Link](new FlowLayout());

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

[Link](0);

});

l1=new Label(" User Technologies");

l2=new Label("User Profession");


l=new List(4,true);

[Link]("C");

[Link]("C++");

[Link]("java");

[Link]("python");

[Link]("oracle");

[Link](this);

ch=new Choice();

[Link]("Student");

[Link]("EmpIoyee");

[Link]("Teacher");

[Link](this);

[Link](l1); [Link](l);

[Link](l2); [Link](ch);

public void itemStateChanged(ItemEvent ie)

String[] items=[Link]();

for(int i=0;i<[Link];i++)

utech=utech+items[i]+" ";

uprof=[Link]();

repaint();

public void paint(Graphics g)

Font f=new Font("arial",[Link], 30);

[Link](f);

[Link]("Technologies :"+utech, 50, 300);


[Link]("Profession :"+uprof, 50, 350);

utech="";

class ListEx

public sta c void main(String[] args)

UserFrame uf=new UserFrame();

[Link] menu bar,menu and menu item

import [Link].*;

import [Link].*;

class UserFrame extends Frame implements Ac onListener

MenuBar mb;

Menu m;

MenuItem mi1, mi2, mi3;

String item="";

UserFrame()

[Link](true);

[Link](500,500);

[Link]("Menu Example");

[Link]([Link]);

[Link](new FlowLayout());

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

{
[Link](0);

});

mb=new MenuBar();

[Link](mb);

m=new Menu("File");

[Link](m);

mi1=new MenuItem("new");

mi2=new MenuItem("Open");

mi3=new MenuItem("Save");

[Link](mi1);

[Link](mi2);

[Link](mi3);

[Link] onListener(this);

[Link] onListener(this);

[Link] onListener(this);

public void ac onPerformed(Ac onEvent ae)

item=[Link] onCommand();

repaint();

public void paint(Graphics g)

Font f=new Font("arial",[Link],30);

[Link](f);

[Link]("Selected Item :"+item, 50, 300);

}
class MenuEx

public sta c void main(String[] args)

UserFrame uf=new UserFrame();

[Link] on scrollbar

import [Link].*;

import [Link].*;

class UserFrame extends Frame implements AdjustmentListener

Scrollbar sb;

int posi on;

UserFrame()

[Link](true);

[Link](500,500);

[Link]("scrollbar Example");

[Link]([Link]);

[Link](new BorderLayout());

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

[Link](0);

});

sb=new Scrollbar([Link]);

[Link](this);
[Link]([Link],sb);

public void adjustmentValueChanged(AdjustmentEvent ae)

posi on=[Link]();

repaint();

public void paint(Graphics g)

Font f=new Font("arial", [Link], 30);

[Link](f);

[Link]("Posi on :"+posi on, 50, 300);

class ScrollBarEx

public sta c void main(String[] args)

UserFrame uf=new UserFrame();

[Link] method in frame

import [Link].*;

class MyFrame extends Frame

MyFrame()

[Link](true);

[Link](500,500);

[Link]("user defined frame");

[Link]([Link]);
}

//with out calling paint method how the effects shown to gui?

//in constructors before execu ng subclass , super class

//constructor is executed . Frame is super class.

//in Frame class there is a method called repaint() it calls , update(Graphics g)

// then it calss paint(Graphics g)

public void paint(Graphics g)

Font f= new Font("arial" , [Link]+[Link],35);

[Link]([Link]);

[Link](f);

[Link]("gui frame" , 100,100);

class MyFrame1

public sta c void main(String[] args)

MyFrame mf= new MyFrame();

[Link] layout

import [Link].*;

public class GridLayout1 extends Frame

public GridLayout1()

// Create Bu ons
Bu on bu on1 = new Bu on("Bu on 1");

Bu on bu on2 = new Bu on("Bu on 2");

Bu on bu on3 = new Bu on("Bu on 3");

Bu on bu on4 = new Bu on("Bu on 4");

Bu on bu on5 = new Bu on("Bu on 5");

// Set layout manager to GridLayout

setLayout(new GridLayout(2, 3)); // 2 rows, 3 columns

// Add bu ons to the frame

add(bu on1);

add(bu on2);

add(bu on3);

add(bu on4);

add(bu on5);

// Se ng frame proper es

setSize(300, 200);

setTitle("GridLayout Example");

setVisible(true);

// Handle window close event

addWindowListener(new [Link]() {

public void windowClosing([Link] windowEvent) {

[Link](0);

});

public sta c void main(String[] args) {

new GridLayout1();
}

[Link] on keyboard event

import [Link].*;

import [Link].*;

class KeyListenerImpl implements KeyListener

public void keyPressed(KeyEvent ke)

[Link]("KeyPressed["+[Link]()+"]");

public void keyTyped(KeyEvent ke)

[Link]("KeyTyped["+[Link]()+"]");

public void keyReleased(KeyEvent ke)

[Link]("KeyReleased["+[Link]()+"]");

class MyFrame extends Frame

MyFrame()

[Link](true);

[Link](500,500);

[Link]("Window Events Example");

[Link]([Link]);

[Link](new WindowAdapter()

{
public void windowClosing(WindowEvent we)

[Link]("WindowClosing");

[Link](0);

});

[Link](new KeyListenerImpl());

class KeyEventsEx

public sta c void main(String[] args)

MyFrame mf=new MyFrame();

9b. keyboard event handling abstract adaptor class methods

import [Link].*;

import [Link].*;

class KeyAdapter implements KeyListener

public void keyPressed(KeyEvent ke)

public void keyTyped(KeyEvent ke)

public void keyReleased(KeyEvent ke)

}
[Link] on mousevent

import [Link].*;

import [Link].*;

class MouseListenerImpl implements MouseListener

public void mousePressed(MouseEvent me)

[Link]("Mouse Pressed["+[Link]()+","+[Link]()+"]");

public void mouseReleased(MouseEvent me)

[Link]("Mouse Released["+[Link]()+","+[Link]()+"]");

public void mouseClicked(MouseEvent me)

[Link]("Mouse Clicked["+[Link]()+","+[Link]()+"]");

public void mouseEntered(MouseEvent me)

[Link]("Mouse Entered["+[Link]()+","+[Link]()+"]");

public void mouseExited(MouseEvent me)

[Link]("Mouse Exited["+[Link]()+","+[Link]()+"]");

class MyFrame extends Frame

MyFrame()
{

[Link](true);

[Link](500,500);

[Link]("Window Events Example");

[Link]([Link]);

[Link](new WindowAdapter()

public void windowClosing(WindowEvent we)

[Link]("WindowClosing");

[Link](0);

});

[Link](new MouseListenerImpl());

class MouseEventEx

public sta c void main(String[] args)

MyFrame mf=new MyFrame();

[Link] event handling abstract adopter class methods

import [Link].*;

import [Link].*;

class MouseAdapter implements MouseListener

public void mousePressed(MouseEvent me)

{
}

public void mouseReleased(MouseEvent me)

public void mouseClicked(MouseEvent me)

public void mouseEntered(MouseEvent me)

public void mouseExited(MouseEvent me)

[Link] with extends frame class for customiza on in frame

import [Link].*;

import [Link].*;

class MyFrame extends Frame

MyFrame()

[Link](true);

[Link](500,500);

[Link]("Window Events Example");

[Link]([Link]);

[Link](new WindowAdapter()
{

public void windowClosing(WindowEvent we)

[Link]("WindowClosing");

[Link](0);

});

class WindowEventex

public sta c void main(String[] args)

MyFrame mf=new MyFrame();

[Link] on windowevent

import [Link].*;

import [Link].*;

class WindowListenerImpl implements WindowListener

public void windowOpened(WindowEvent we)

[Link]("WindowOpened");

public void windowClosed(WindowEvent we)

[Link]("WidnowClosed");

public void windowClosing(WindowEvent we)

{
[Link]("WidnowClosing");

[Link](0);

public void windowIconified(WindowEvent we)

[Link]("Widnowlconified");

public void windowDeiconified(WindowEvent we)

[Link]("windowDeiconified");

public void windowAc vated(WindowEvent we)

[Link]("WindowAc vated");

public void windowDeac vated(WindowEvent we)

[Link]("WindowDeac vated");

class MyFrame extends Frame

MyFrame()

[Link](true);

[Link](500,500);

[Link]("Window Events Example");

[Link]([Link]);

[Link](new WindowListenerImpl());

}
class WindowEventsEx

public sta c void main(String[] args)

MyFrame mf=new MyFrame();

12b) window event handling abstract adopter class methods

Class WindowAdapter implements WindowListener

public void windowOpened(WindowEvent we)

public void windowClosed(WindowEvent we)

public void windowClosing(WindowEvent we)

public void windowIconified(WindowEvent we)

public void windowDeiconified(WindowEvent we)

}
public void windowAc vated(WindowEvent we)

public void windowDeac vated(WindowEvent we)

[Link] to create simple frame without extending.

import [Link].*;

class Frame1

public sta c void main(String[] args)

Frame f = new Frame("csmb");

//[Link]();

[Link](true);

[Link](500,500);

[Link]("csmb");

[Link]([Link]);

[Link] on textarea with listener methods

import [Link].*;

import [Link].*;

import [Link];

import [Link];
public class TextArea1 extends Frame

private TextArea textArea;

public TextArea1() {

// Create TextArea

textArea = new TextArea();

// Adding FocusListener to the TextArea

[Link](new FocusListener()

public void focusGained(FocusEvent e)

[Link]("Focus gained on the TextArea");

public void focusLost(FocusEvent e)

[Link]("Focus lost on the TextArea");

});

add(textArea);

setSize(300, 200);

setTitle("TextArea Focus Example");

setVisible(true);

addWindowListener(new WindowAdapter()

{
public void windowClosing(WindowEvent e)

[Link]("Window closing");

dispose();

[Link](0);

);

public sta c void main(String[] args) {

new TextArea1();

[Link] on Dialogbox

import [Link] on;

import [Link];

import [Link] onPane;

import [Link];

import [Link] onEvent;

import [Link] onListener;

public class CustomDialog extends JFrame {

public CustomDialog() {

setTitle("Main Frame");

setSize(400, 300);

setDefaultCloseOpera on(JFrame.EXIT_ON_CLOSE);

JBu on showDialogBu on = new JBu on("Show Dialog");

showDialogBu [Link] onListener(new Ac onListener() {


public void ac onPerformed(Ac onEvent e) {

showDialog();

});

JPanel panel = new JPanel();

[Link](showDialogBu on);

add(panel);

private void showDialog() {

JOp [Link](this, "Hello, this is a simple JOp onPane dialog!",

"Informa on", JOp onPane.INFORMATION_MESSAGE);

//JOp onPane.INFORMATION_MESSAGE: This parameter specifies


the type of icon that will be

//displayed in the dialog box. INFORMATION_MESSAGE indicates


that an informa on icon will

//be displayed. Other possible values include ERROR_MESSAGE,


WARNING_MESSAGE,

//QUESTION_MESSAGE, and PLAIN_MESSAGE.

public sta c void main(String[] args) {

CustomDialog customDialog = new CustomDialog();

[Link](true);

[Link] on Jsplitpane

import [Link].*;

import [Link].*;
public class SplitPaneExample extends JFrame {

public SplitPaneExample() {

setTitle("Split Pane Example");

setSize(400, 300);

setDefaultCloseOpera on(JFrame.EXIT_ON_CLOSE);

// Create two panels

JPanel panel1 = new JPanel();

JPanel panel2 = new JPanel();

// Add some components to each panel

[Link](new JLabel("Le Panel Content"));

[Link](new JLabel("Right Panel Content"));

// Create a split pane with the two panels

JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, panel1, panel2);

// Set the ini al divider loca on (op onal)

[Link] on(200);

// Add the split pane to the frame

getContentPane().add(splitPane);

// Set the frame to be visible

setVisible(true);

public sta c void main(String[] args) {

new SplitPaneExample();

}
}

[Link] on Jtabbedpane

import [Link].*;

import [Link].*;

public class TabbedPaneExample extends JFrame {

public TabbedPaneExample() {

setTitle("Tabbed Pane Example");

setDefaultCloseOpera on(JFrame.EXIT_ON_CLOSE);

setSize(400, 300);

JTabbedPane tabbedPane = new JTabbedPane();

JPanel panel1 = new JPanel();

[Link](new JLabel("Content for Tab 1"));

[Link]("Tab 1", null, panel1, "Tab 1 Tool p");

JPanel panel2 = new JPanel();

[Link](new JLabel("Content for Tab 2"));

[Link]("Tab 2", null, panel2, "Tab 2 Tool p");

JPanel panel3 = new JPanel();

[Link](new JLabel("Content for Tab 3"));

[Link]("Tab 3", null, panel3, "Tab 3 Tool p");

getContentPane().add(tabbedPane);

// Set the frame to be visible

setVisible(true);

}
public sta c void main(String[] args) {

new TabbedPaneExample();

[Link] on JScrollPane

import [Link].*;

public class ScrollPaneExample extends JFrame {

public ScrollPaneExample() {

setTitle("Ver cal Scroll Pane Example");

setSize(300, 200);

setDefaultCloseOpera on(JFrame.EXIT_ON_CLOSE);

// Create a JTextArea with some text

JTextArea textArea = new JTextArea("This is a JTextArea inside a ver cal JScrollPane.\n"

+ "You can use JScrollPane to provide ver cal scrolling func onality.");

// Create a JScrollPane with ver cal scrolling and add the JTextArea to it

JScrollPane scrollPane = new JScrollPane(textArea,


JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);

// Set up the layout

getContentPane().add(scrollPane);

// Set the frame to be visible

setVisible(true);

public sta c void main(String[] args) {


new ScrollPaneExample();

[Link] on JFileChooser

import [Link].*;

import [Link].*;

import [Link].*;

import [Link].*;

import [Link].*;

class FileChooserFrame extends JFrame implements Ac onListener

JLabel l;

TextField ;

JBu on b;

Container c;

JFileChooser fc;

FileChooserFrame()

[Link](true);

[Link](500,500);

[Link]("File Chooser Example");

[Link] on(JFrame.EXIT_ON_CLOSE);

c=[Link]();

[Link]([Link]);

[Link](new FlowLayout());

l=new JLabel("Select File");

=new TextField (20);

b=new JBu on("Browse");

[Link] onListener(this);

[Link](l);[Link]( );[Link](b);

}
public void ac onPerformed(Ac onEvent ae)

class FileDialogFrame extends JFrame implements Ac onListener

FileDialogFrame()

[Link](true);

[Link](500,500);

fc=new JFileChooser();

[Link] onListener(this);

[Link]().add(fc);

public void ac onPerformed(Ac onEvent ae)

File f=[Link]();

String path=[Link]();

.setText(path);

[Link](false);

FileDialogFrame ff=new FileDialogFrame();

class FileChooserEx

public sta c void main(String[] args)

FileChooserFrame f=new FileChooserFrame();

}
}

[Link] on JTable

import [Link].*;

import [Link].*;

import [Link].*;

class TableEx

public sta c void main(String[] args)

String[] header={"EID", "ENAME", "ESAL", "EADDR"};

Object[][] body={{"e1","AAA","5000", "Hyderabad"},{" e2" , "BBB", "6000",

"Secbad"},{"e3", "CCC", "7000", "Vijayawada"},{"e4", "DDD", "8000", "Warngal"}};

JFrame f=new JFrame();

[Link](true);

[Link](500,500);

Container c=[Link]();

[Link](new BorderLayout());

JTable t=new JTable(body,header);

JTableHeader th=[Link]();

[Link](th,[Link]);

[Link](t,[Link]);

[Link] on applica on by using swing component

import [Link].*;

import [Link].*;

import [Link] onEvent;

import [Link] onListener;

import java.u [Link];

class Registra onFrame extends JFrame implements Ac onListener {


JLabel l1, l2, l3, l4, l5, l6, l7;

JTextField ;

JPasswordField pf;

JCheckBox cb1, cb2, cb3;

JRadioBu on rb1, rb2;

JList<String> l;

JComboBox<String> cb;

JTextArea ta;

JBu on b;

Container c;

String uname = "", upwd = "", uqual = "", ugen = "", uprof = "", uaddr = "";

String[] utech;

Registra onFrame() {

[Link](true);

[Link](500, 600);

[Link] on(JFrame.EXIT_ON_CLOSE);

c = getContentPane();

[Link]([Link]);

[Link](null);

l1 = new JLabel("User name");

[Link](50, 100, 100, 10);

l2 = new JLabel("Password");

[Link](50, 150, 100, 10);

l3 = new JLabel("Qualifica on");

[Link](50, 200, 100, 10);

l4 = new JLabel("Gender");

[Link](50, 250, 100, 10);

l5 = new JLabel("Technologies");

[Link](50, 300, 100, 10);

l6 = new JLabel("Profession");
[Link](50, 350, 100, 10);

l7 = new JLabel("Address");

[Link](50, 400, 100, 10);

= new JTextField(20);

.setBounds(150, 90, 100, 30);

.setToolTipText("This is text field");

pf = new JPasswordField(20);

[Link](150, 140, 100, 30);

[Link]("This is password field");

cb1 = new JCheckBox("BSC");

[Link](150, 190, 60, 30);

cb2 = new JCheckBox("MCA");

[Link](220, 190, 60, 30);

cb3 = new JCheckBox("PHD");

[Link](290, 190, 60, 30);

rb1 = new JRadioBu on("Male");

[Link](150, 240, 80, 30);

rb2 = new JRadioBu on("Female");

[Link](250, 240, 80, 30);

Bu onGroup bg = new Bu onGroup();

[Link](rb1);

[Link](rb2);

String[] techs = {"c", "C++", "JAVA"};

l = new JList<>(techs);

[Link](150, 280, 60, 60);


String[] prof = {"Student", "Business", "Teacher"};

cb = new JComboBox<>(prof);

[Link](150, 340, 80, 30);

ta = new JTextArea(5, 25);

[Link](150, 380, 100, 40);

b = new JBu on("Registra on");

[Link](80, 450, 110, 40);

[Link] onListener(this);

[Link](l1);

[Link]( );

[Link](l2);

[Link](pf);

[Link](l3);

[Link](cb1);

[Link](cb2);

[Link](cb3);

[Link](l4);

[Link](rb1);

[Link](rb2);

[Link](l5);

[Link](l);

[Link](l6);

[Link](cb);

[Link](l7);

[Link](ta);

[Link](b);

}
public void ac onPerformed(Ac onEvent ae) {

uname = .getText();

upwd = [Link]([Link]());

if ([Link]()) {

uqual = uqual + [Link]() + " ";

if ([Link]()) {

uqual = uqual + [Link]() + " ";

if ([Link]()) {

uqual = uqual + [Link]() + " ";

if ([Link]()) {

ugen = [Link]();

if ([Link]()) {

ugen = [Link]();

List<String> selectedTechsList = [Link]();

utech = [Link](new String[0]);

uprof = (String) [Link]();

uaddr = [Link]();

DisplayFrame df = new DisplayFrame(); // Op onal: Display the informa on here

class DisplayFrame extends JFrame {

DisplayFrame() {
[Link](true);

[Link](500, 500);

[Link]([Link]);

public void paint(Graphics g) {

Font f = new Font("arial", [Link], 25);

[Link](f);

[Link]("Username:" + uname, 50, 100);

[Link]("Password:" + upwd, 50, 150);

[Link]("Qualifica on:" + uqual, 50, 200);

[Link]("User Gender:" + ugen, 50, 250);

[Link]("Technologies:" + [Link](", ", utech), 50, 300);

[Link]("Profession:" + uprof, 50, 350);

[Link]("Address:" + uaddr, 50, 400);

// DisplayFrame df = new DisplayFrame(); // You might want to create DisplayFrame here

public sta c void main(String args[]) {

Registra onFrame rec = new Registra onFrame();

You might also like