Results 1 to 2 of 2
Thread: Converting java to applet...?
- 10-16-2010, 04:42 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
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)
I would like to convert all this to app. It will be really nice if you can show me how.Java Code:package izzat; import java.io.*; 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)) { System.out.println(h.get(s)); } else { System.out.println("Desole mot non trouve"); } } reader1.close(); } catch (Exception e) { e.printStackTrace(); } } }
Thanks for your time and have a wonderful day :D
-
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
-
Converting this Applet to an Application
By karthus in forum New To JavaReplies: 4Last Post: 07-07-2010, 04:30 AM -
Converting java application to applet
By rcj66 in forum Java AppletsReplies: 2Last Post: 03-16-2010, 07:41 PM -
Converting simple Java Application to Applet
By jrohde in forum Java AppletsReplies: 1Last Post: 07-25-2009, 07:48 PM -
Converting an App to Applet
By josephdcoleman in forum New To JavaReplies: 1Last Post: 02-21-2009, 07:07 AM -
Converting netbeans app to applet
By paulious in forum New To JavaReplies: 3Last Post: 10-23-2008, 11:25 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks