//: c13:Button1.java
// Przykład z książki 'Thinking in Java, wydanie 2.', autor - Bruce Eckel
// www.BruceEckel.com
// Patrz informacje o prawach autorskich podane w pliku CopyRight.txt.
// Dodawanie przycisków do apletu.
// <applet code=Button1 width=200 height=50>
// </applet>
import javax.swing.*;
import java.awt.*;
import com.bruceeckel.swing.*;
public class Button1 extends JApplet {
JButton
b1 = new JButton("Przycisk 1"),
b2 = new JButton("Przycisk 2");
public void init() {
Container cp = getContentPane();
cp.setLayout(new FlowLayout());
cp.add(b1);
cp.add(b2);
}
public static void main(String[] args) {
Console.run(new Button1(), 200, 50);
}
} ///:~