AOllTICHNINA RlISłOWSNA • WydłWl ttttrotachnlkl I litfomwtyM
import java.awt.*; import java.awt.avant.*; Import javax.nwing.*;
Import )ava.io.*>
public claaa JDlalogTaat axtanda JFrame implwncnta ActionLłatanar { JButton button;
JDialogTeat() (
ra
aetTitla("JDtalogDemo"); nntbayout(new ttowLayout()); button » new JButton("opan Dialog"); button.a(i<lActiont.latanar (thia); gatCont. ant Pana () .add(button) ; aatSizaPOO, 160); aat.Vi albie (trua);
public vold actionPerformad(ActionRvent a) (
JOptionPana.ahoiiMaaaagaDialog(thia. "Komunikat”. "Error",
JOptionPana. ERROR_MF.S3AGE);
i
public atatlc vołd maln(Strlngt) arga) ł naw JDialogTaat();