• Nie Znaleziono Wyników

GUI, Applets

N/A
N/A
Protected

Academic year: 2021

Share "GUI, Applets"

Copied!
1
0
0

Pełen tekst

(1)

DPOB LI0

Object programming - classes 10

This document contains information about laboratory exercises.

Object programming - classes 10

Subjects - GUI, Swing, Applets

1. Create user interface.

1. Download and import to eclipse project for today laboratory. Open file HelloW orldF rame.java.

2. Create four new objects of type J Label and add them to Frame.

3. Check on the Internet what layout manager is used by default by J F rame.

Change it so you could see all five captions.

4. Create two new objects of type J Button and put them inside J P anel object. Add this new panel to our Frame.

5. Set for J Button objects hotkeys by setM nemonic() and advice message setT oolT ipT ext(). Check if it is working correctly.

6. Serve action generate by J Button objects (addActionListener()). Put as ActionListener class our class CreateAndShowGU I (this).

7. After pushing the button change text in first label to I’ve pressed button XX and change background color of label.

8. Add to panel third button of type J Button. Define action after pressing button using anonymous implementation of ActionListenera interface.

2. Applets.

1. Open file CounterApplet.java. Run applets and see how it works.

2. Copy code form previous task into method init. Change every appearance of object frame to this.

3. Generate J AR file form our project.

4. Create new file with extension .html.

5. Add to source file (.html) code

<applet

code = ’PacketAndAppletClass’

archive = ’JarFileName’, width = 300,

height = 300 />

6. Open created page in any web browser.

1

Cytaty

Powiązane dokumenty

Detection of the emergency; (a) diagnostic parameters validity time are long based on the previous set of diagnostic results; the emergency detector captures the change of

Byzantinist discussed the part of Leo’s work dedicated to logistics, preparation of military expeditions, the management of the enemy territory, the use of the “scorched

przedmiotem jego studiów, jak już wspomnie- liśmy, jest Szpital Świętego Ducha jako przy- tułek dla podrzutków, czyli dzieci wywodzą- cych się z marginesu społecznego, które były

For the study of cancer progression and disease pathology, the modeling of large ensembles of interacting cells in biological tissue is needed. A literature study by Murray

The criteria for case selection were the following: the case had to entail multiple public administrations, the involved public sector organizations collaborated to create a

One is to facilitate advances in mining clinical free text; shared tasks in other biomedical domains have been shown to drive progress in the field in multiple ways (see [Hirschman

The facility maintains strict sanitary rules: usage of hand disinfectant gel, limited contact with employees, maintaining an adequate 1.5 meter distance between those present in

To właśnie członkowie Dozoru Parafi alnego odpowiadali za prawidłowe organizo- wanie wsparcia dla osób potrzebujących pomocy (chorych, bezdomnych, starych, sierot), a jedną z