Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- * @author Wieczorek Krzysztof S15877
- *
- */
- package zad3;
- public class Main {
- public static void main(String[] args) {
- new Okno();
- }
- }
- //-----------------------------------------------------------------------
- package zad3;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- public class Okno extends JFrame {
- public Okno() {
- super("Edytor");
- JPanel panel = new Edytor();
- add(panel);
- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- pack();
- setVisible(true);
- }
- }
- //-------------------------------------------------
- package zad3;
- import java.awt.Color;
- import java.awt.Font;
- import javax.swing.JPanel;
- import javax.swing.JTextArea;
- public class Edytor extends JPanel {
- public Edytor() {
- super();
- JTextArea list = new JTextArea(10, 20); // edytor
- Font czcionka = new Font("Dialog", Font.ITALIC, 14);
- list.setFont(czcionka);
- list.setBackground(Color.BLUE);
- list.setSelectedTextColor(Color.YELLOW);
- list.setForeground(Color.YELLOW);
- this.add(list);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement