/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * appletKlass.java * * Created on 2009-feb-10, 11:05:35 */ package appletexample; import java.awt.*; /** * * @author karlssoj */ public class appletKlass extends javax.swing.JApplet { /** Initializes the applet appletKlass */ public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } public void paint(Graphics grafik) { //grafikfunktioner hit grafik.setColor(Color.GREEN); grafik.fillOval(10, 10, 50, 50); } /** This method is called from within the init() method to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 400, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(0, 300, Short.MAX_VALUE) ); }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables }