hello can i ask for a help....i dont know how to continue with my project..please help me with this..i my project is to make a sample editor that counts the characters, consonants, vowels,symbols and spaces..can u please help me with this...my code as of now..still the layout..
import java.awt.*;
import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import java.util.*;
public class gui2 extends JFrame
{
private static final int WIDTH = 1500;
private static final int HEIGHT = 1500;
private JLabel characL, vowL, consoL, spacesL, symL;
private JTextField characTF, vowTF, consoTF, spacesTF, symTF;
private JTextArea ATA;
public gui2()
{
characL = new JLabel("Characters:", SwingConstants.LEFT);
vowL = new JLabel("Vowels: ", SwingConstants.LEFT);
consoL = new JLabel("Consonants: ", SwingConstants.LEFT);
spacesL = new JLabel("Spaces:", SwingConstants.LEFT);
symL = new JLabel("Symbols:", SwingConstants.LEFT);
characTF = new JTextField(20);
vowTF = new JTextField(20);
consoTF = new JTextField(20);
spacesTF = new JTextField(20);
symTF = new JTextField(20);
ATA = new JTextArea();
setTitle("Jesse's Text Editor");
Container pane = getContentPane();
setLayout(null);
pane.add(ATA);
pane.add(characL);
pane.add(characTF);
pane.add(vowL);
pane.add(vowTF);
pane.add(consoL);
pane.add(consoTF);
pane.add(spacesL);
pane.add(spacesTF);
pane.add(symL);
pane.add(symTF);
ATA.setSize(1000,600);
characL.setSize(100,50);
characTF.setSize(75,50);
vowL.setSize(100,50);
vowTF.setSize(75,50);
consoL.setSize(100,50);
consoTF.setSize(75,50);
spacesL.setSize(100,50);
spacesTF.setSize(75,50);
symL.setSize(100,50);
symTF.setSize(75,50);
ATA.setLocation(80,20);
characL.setLocation(1,700);
characTF.setLocation(80,700);
vowL.setLocation(200,700);
vowTF.setLocation(300,700);
consoL.setLocation(400,700);
consoTF.setLocation(500,700);
spacesL.setLocation(600,700);
spacesTF.setLocation(700,700);
symL.setLocation(800,700);
symTF.setLocation(900,700);
ATA.setBorder(BorderFactory.createLineBorder(Color.black));
ATA.setColumns(50);
ATA.setRows(20);
setSize(WIDTH, HEIGHT);
setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}
public static void main(String[] args)
{
new gui2();
}
}
the code is not good..^^but it runs..still the layout...