Results 1 to 2 of 2
  1. #1
    xtrapx is offline Member
    Join Date
    Oct 2010
    Rep Power

    Default Converting java to applet...?

    Hello everyone, I am new here and I hope I can find some help!

    First of all, I would like to thank you for your time.

    I would like to convert this whole java application to applet. But for now, I have to admit that I am lost. This is how my project looks (it's a dictionary app)

    Java Code:
    package izzat;
    import java.util.*;
     * @author --
    public class Main {
        public static void main(String[] args) throws IOException {
            ClavierNS cl = new ClavierNS();
            try {
                BufferedReader reader1 = new BufferedReader(new InputStreamReader(new FileInputStream("dec.txt"), "ISO-8859-15"));
                String line1 = "";
                Hashtable<String, String> h = new Hashtable<String, String>();
                while ((line1 = reader1.readLine()) != null) {
                    String[] arr = line1.split("\t");
                    if (arr.length > 1)
                        h.put(arr[0], arr[1]);
                System.out.println("Entrez un mot: ");
                String s = cl.lireString();
                for (int i = 0; i < 1000; i++) {
                    System.out.println("Entrez un mot: ");
                    s = cl.lireString();
                    if (h.containsKey(s)) {
                    } else {
                        System.out.println("Desole mot non trouve");
            } catch (Exception e) {
    I would like to convert all this to app. It will be really nice if you can show me how.

    Thanks for your time and have a wonderful day :D

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    There is no simple "convert to applet" heuristic. But I can tell you that before contemplating writing this as a GUI you'll need to change this very simple main-method only application to a true OOP class with non-static fields, a constructor and methods. If you are not sure how to do this, then read the tutorials, but you will need to understand this first before trying to learn GUI coding. Then after understanding the basics you'll want to go through the Oracle Swing tutorials to learn how to create a GUI.

    Much luck and welcome to the forum.

Similar Threads

  1. Converting this Applet to an Application
    By karthus in forum New To Java
    Replies: 4
    Last Post: 07-07-2010, 05:30 AM
  2. Converting java application to applet
    By rcj66 in forum Java Applets
    Replies: 2
    Last Post: 03-16-2010, 08:41 PM
  3. Converting simple Java Application to Applet
    By jrohde in forum Java Applets
    Replies: 1
    Last Post: 07-25-2009, 08:48 PM
  4. Converting an App to Applet
    By josephdcoleman in forum New To Java
    Replies: 1
    Last Post: 02-21-2009, 08:07 AM
  5. Converting netbeans app to applet
    By paulious in forum New To Java
    Replies: 3
    Last Post: 10-23-2008, 12:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts