aspose file tools*
The moose likes Java in General and the fly likes help about Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "help about" Watch "help about" New topic
Author

help about

Per kermel
Greenhorn

Joined: Feb 22, 2004
Posts: 9
im trying to make a dictonary, where teh ppl who runs the application gets on word in norewgain etc and 3 words in english, but only 1 is the same meaning as the norwegian, when the ppl have answerd the same quiz correctly 4 times the prog shall not use the quiz anymore.. somone plz help?`
public class OrdBokGUI extends JFrame {
public OrdBokGUI() {
setTitle("Tren P� Utlandske Ord");
Conteiner cp = getContentPane();
cp.add(new Overskrift(),Borderlayout,NORTH);
cp.add(new TreningsPanel(),Borderlayout,CENTER);
cp.add(new LukkKnapp(),Borderlayput,SOUTH);
}
}
thats what i made so fare..
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
This uses JOptionPanes, not a GUI. It's a bit rough, but seems to work OK.

this is the contents of "Test.txt" - needs to be in this style
norwegian word,english word1,english word2,english word3,number of correct answer (0-based)
nor1,eng1,eng2,eng3,0
nor2,eng1,eng2,eng3,1
nor3,eng1,eng2,eng3,2
nor4,eng1,eng2,eng3,0
nor5,eng1,eng2,eng3,1
nor6,eng1,eng2,eng3,2
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"okcomputer kermel",
Sorry, but your display name does not comply to the JavaRanch Display name rules explained here.
Your display name must be two words: your first name, then your last name, and fictitious names are not allowed.
You can edit your profile with a valid display name here.
Thanks,
Dave.
ps Welcome to the Ranch! I hope you get all your questions answered!
Per kermel
Greenhorn

Joined: Feb 22, 2004
Posts: 9
didoes have to be a gui..
need some classes for close button etc.. and header
thing is that i have to inmport a file of the web,,, with the forgin language on it.. just called it tjekkisk.n2a... but dunno how that works
but if somone could comment on some bad programming..
import java.awt.*;
import java.swing.*;
import java.io.*;
import java.net.*;
import java.util.*;
public class Panel extends JPanel
{
public Panel()
{
String testfil = "tsjekkisk.n2a";
try{
setLayout(new BorderLayout());
// Et panel som innholder 2 knapper som skal lese en ordliste
Jpanel nPan = new JPanel(new GrindLayout(0,2));
add(nPan,BorderLayout.NORTH);
JButton lesFilFraKnapp = new JButton("ordliste lokalt");
JButton lesWebFraKnapp = new JButton("ordliste web");
nPan.add(lesFilFraKnapp);
nPan.add(lesFilWebKnapp);
//Norsk ord med forklaringer
JPanel cPan = new JPanel();
add(cPan,BorderLayout.CENTER);
JLabel FNorskOrd = new JLabel("Hva betyr dette");
JTextField KNorskOrd = new JTextField("hus",20);
c.Pan.add(FNorskOrd);
c.Pan.add(KNorskOrd);
//panel som har knapper som henter ord
JPanel sPan = new JPanel(new GrindLayout(0,3));
add(sPan,BorderLayout.SOUTH);
JButton ordKnapp1 = new ordKnapp();
JButton ordKnapp2 = new ordKnapp();
JButton ordKnapp3 = new ordKnapp();

sPan.add(ordKnapp1);
sPan.add(ordKnapp2);
sPan.add(ordKnapp3);
Properties p = new Properties();
p.load(new FileInputStream(testfil));
}
catch(IOException fnf) {}
Properties p = System.getProperties();
p.list(System.out);
}
}
Per kermel
Greenhorn

Joined: Feb 22, 2004
Posts: 9
hmm.. found javax.swing....
still doesnt run...
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
JPanel sPan = new JPanel(new GrindLayout(0,3));
add(sPan,BorderLayout.SOUTH);

I think you mean: ....(new GridLayout(0,3));
Have a read of the Swing Tutorial
HTH
Nigel
Per kermel
Greenhorn

Joined: Feb 22, 2004
Posts: 9
looked at it.. very uisfuk thx.. but need a buttons read from(lesFraFil)
could somone complete it im out of ideas?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: help about