Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  1. import java.awt.Color;
  2.  
  3. import javax.swing.JButton;
  4. import javax.swing.JFrame;
  5. import javax.swing.JTextArea;
  6.  
  7. import java.io.BufferedReader;
  8. import java.io.BufferedWriter;
  9. import java.io.IOException;
  10. import java.io.InputStreamReader;
  11. import java.io.OutputStreamWriter;
  12.  
  13. public class DSTSHandler {
  14.    
  15.     DSTServerGui dstgui;
  16.  
  17.     DSTSHandler() {
  18.         dstgui = new DSTServerGui();
  19. }
  20.    
  21.     void Start_server() {
  22.         dstgui.textArea.append("привет из класса DSTHandler");
  23.     }
  24.  
  25.     public static void main(String[] args) {
  26.         DSTSHandler dst = new DSTSHandler();
  27.         dst.Start_server();
  28.     }
  29. }
  30.  
  31.  
  32. public class DSTServerGui extends JFrame{
  33.     public JTextArea textArea;
  34.     private static final long serialVersionUID = 1L;
  35.    
  36.     public DSTServerGui()  {
  37.         setBounds(100, 100, 450, 300);
  38.         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  39.         getContentPane().setLayout(null);
  40.        
  41.         JTextArea textArea = new JTextArea();
  42.         textArea.setForeground(Color.GREEN);
  43.         textArea.setBackground(Color.BLACK);
  44.         textArea.setBounds(0, 0, 324, 273);
  45.         getContentPane().add(textArea);
  46.        
  47.         textArea.append("Привет");
  48.     }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement