package lingo;_x000D_
_x000D_
import java.awt.Color;_x000D_
import java.awt.Dimension;_x000D_
import java.awt.Font;_x000D_
import java.awt.Graphics;_x000D_
import java.awt.LayoutManager;_x000D_
_x000D_
/**_x000D_
* Deze klasse beschrijft het aanmaken van een raster  als ook de letters die gedrukt worden in de gui. _x000D_
* _x000D_
* @Author Snoeck Seppe_x000D_
* @Version 1.0 24/08/2015 13:00_x000D_
**/_x000D_
public class Raster extends javax.swing.JPanel {_x000D_
_x000D_
    /**_x000D_
     * Creates new form Raster_x000D_
     */    _x000D_
    Lingo lingo;_x000D_
    _x000D_
    String inputWoord = "     ";_x000D_
    _x000D_
    public Raster() {_x000D_
        initComponents();_x000D_
    }_x000D_
    _x000D_
    @Override_x000D_
    public void paintComponent(Graphics g) {_x000D_
        for (int y = 0; y < 360; y +=60) {_x000D_
            int i = 0;_x000D_
            for (int x = 0; x < 300; x +=60) {_x000D_
                printKot(g,x,y);_x000D_
                printLetter(g,x,y,i);_x000D_
                i++;_x000D_
            }_x000D_
        }_x000D_
    }_x000D_
_x000D_
    public Raster(String inputwoord) {_x000D_
        this.inputWoord = inputwoord;_x000D_
    }_x000D_
    _x000D_
    /**_x000D_
     *_x000D_
     * @param g Graphics_x000D_
     * @param x Een coördinaat op de x-as_x000D_
     * @param y Een coördinaat op de y-as_x000D_
     */_x000D_
    public void printKot(Graphics g, int x, int y) {_x000D_
                g.drawRect(x, y, 60, 60); _x000D_
    }_x000D_
   _x000D_
    /**_x000D_
     *_x000D_
     * @param g Graphics_x000D_
     * @param x Een coördinaat op de x-as_x000D_
     * @param y Een coördinaat op de y-as_x000D_
     * @param i Een teller om alle letter van het woord te doorlopen_x000D_
     */_x000D_
    public void printLetter(Graphics g, int x, int y, int i) {_x000D_
        g.setFont(new Font("TimesRoman", Font.BOLD, 40));   _x000D_
        g.setColor(Color.red);_x000D_
        g.drawString(Character.toString(inputWoord.charAt(i)), 15 + x, 40 + y);_x000D_
        g.setColor(Color.black);_x000D_
    }_x000D_
    _x000D_
    /**_x000D_
     * This method is called from within the constructor to initialize the form._x000D_
     * WARNING: Do NOT modify this code. The content of this method is always_x000D_
     * regenerated by the Form Editor._x000D_
     */_x000D_
    @SuppressWarnings("unchecked")_x000D_
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          _x000D_
    private void initComponents() {_x000D_
_x000D_
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);_x000D_
        this.setLayout(layout);_x000D_
        layout.setHorizontalGroup(_x000D_
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)_x000D_
            .addGap(0, 400, Short.MAX_VALUE)_x000D_
        );_x000D_
        layout.setVerticalGroup(_x000D_
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)_x000D_
            .addGap(0, 300, Short.MAX_VALUE)_x000D_
        );_x000D_
    }// </editor-fold>                        _x000D_
_x000D_
    // Variables declaration - do not modify                     _x000D_
    // End of variables declaration                   _x000D_
}
/**_x000D_
     *_x000D_
     * @param g Graphics_x000D_
     * @param x Een coördinaat op de x-as_x000D_
     * @param y Een coördinaat op de y-as_x000D_
     */
package lingo;_x000D_
_x000D_
import java.awt.Color;_x000D_
import java.awt.Dimension;_x000D_
import java.awt.Font;_x000D_
import java.awt.Graphics;_x000D_
import java.awt.LayoutManager;_x000D_
_x000D_
/**_x000D_
* Deze klasse beschrijft het aanmaken van een raster  als ook de letters die gedrukt worden in de gui. _x000D_
* _x000D_
* @Author Snoeck Seppe_x000D_
* @Version 1.0 24/08/2015 13:00_x000D_
**/_x000D_
public class Raster extends javax.swing.JPanel {_x000D_
_x000D_
    /**_x000D_
     * Creates new form Raster_x000D_
     */    _x000D_
    Lingo lingo;_x000D_
    _x000D_
    String inputWoord = "     ";_x000D_
    _x000D_
    public Raster() {_x000D_
        initComponents();_x000D_
    }_x000D_
    _x000D_
    @Override_x000D_
    public void paintComponent(Graphics g) {_x000D_
        for (int y = 0; y < 360; y +=60) {_x000D_
            int i = 0;_x000D_
            for (int x = 0; x < 300; x +=60) {_x000D_
                printKot(g,x,y);_x000D_
                printLetter(g,x,y,i);_x000D_
                i++;_x000D_
            }_x000D_
        }_x000D_
    }_x000D_
_x000D_
    public Raster(String inputwoord) {_x000D_
        this.inputWoord = inputwoord;_x000D_
    }_x000D_
    _x000D_
    /**_x000D_
     *_x000D_
     * @param g Graphics_x000D_<SUF>*/_x000D_
    public void printKot(Graphics g, int x, int y) {_x000D_
                g.drawRect(x, y, 60, 60); _x000D_
    }_x000D_
   _x000D_
    /**_x000D_
     *_x000D_
     * @param g Graphics_x000D_
     * @param x Een coördinaat op de x-as_x000D_
     * @param y Een coördinaat op de y-as_x000D_
     * @param i Een teller om alle letter van het woord te doorlopen_x000D_
     */_x000D_
    public void printLetter(Graphics g, int x, int y, int i) {_x000D_
        g.setFont(new Font("TimesRoman", Font.BOLD, 40));   _x000D_
        g.setColor(Color.red);_x000D_
        g.drawString(Character.toString(inputWoord.charAt(i)), 15 + x, 40 + y);_x000D_
        g.setColor(Color.black);_x000D_
    }_x000D_
    _x000D_
    /**_x000D_
     * This method is called from within the constructor to initialize the form._x000D_
     * WARNING: Do NOT modify this code. The content of this method is always_x000D_
     * regenerated by the Form Editor._x000D_
     */_x000D_
    @SuppressWarnings("unchecked")_x000D_
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          _x000D_
    private void initComponents() {_x000D_
_x000D_
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);_x000D_
        this.setLayout(layout);_x000D_
        layout.setHorizontalGroup(_x000D_
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)_x000D_
            .addGap(0, 400, Short.MAX_VALUE)_x000D_
        );_x000D_
        layout.setVerticalGroup(_x000D_
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)_x000D_
            .addGap(0, 300, Short.MAX_VALUE)_x000D_
        );_x000D_
    }// </editor-fold>                        _x000D_
_x000D_
    // Variables declaration - do not modify                     _x000D_
    // End of variables declaration                   _x000D_
}