Guest User

Untitled

a guest
Jul 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. public class PaintOn extends java.applet.Applet {
  2.  
  3. /** Initializes the applet PaintOn */
  4. public void init() {
  5. try {
  6. java.awt.EventQueue.invokeAndWait(new Runnable() {
  7. public void run() {
  8. initComponents();
  9. }
  10. });
  11. } catch (Exception ex) {
  12. ex.printStackTrace();
  13. }
  14. }
  15.  
  16. /** This method is called from within the init() method to
  17. * initialize the form.
  18. * WARNING: Do NOT modify this code. The content of this method is
  19. * always regenerated by the Form Editor.
  20. */
  21. // <editor-fold defaultstate="collapsed" desc="Generated Code">
  22. private void initComponents() {
  23.  
  24. canvas1 = new java.awt.Canvas();
  25.  
  26. setName("Form"); // NOI18N
  27. setLayout(new java.awt.BorderLayout());
  28.  
  29. canvas1.setName("canvas1"); // NOI18N
  30. add(canvas1, java.awt.BorderLayout.CENTER);
  31. canvas1.getAccessibleContext().setAccessibleParent(null);
  32. }// </editor-fold>
  33.  
  34.  
  35. // Variables declaration - do not modify
  36. private java.awt.Canvas canvas1;
  37. // End of variables declaration
  38. final void OnRepaint (Graphics g){
  39. g.drawString("Test", 10,10);
  40. }
  41. }
Add Comment
Please, Sign In to add comment