Sven Habermann

Greenhorn
+ Follow
since May 14, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sven Habermann

I have an very urgent problem! I wrote an Applet and integrated it to a HTML-file by using:
<applet code=SHSimulationsApplet.class width=800 height=600> </applet>.
The HTML-file and my classes are in the same directory, but when I start my homepage, I always get the message: class SHSimulationsApplet.class not found. I don't know why and what to do??
PLEASE HELP ME!!!
20 years ago
I wrote an applet, that should load an wav-file. The wav-file and the class-files of the applet are at the same directory of the server, but the applet cannot load it. I always get the FileNotFoundException, when I want to get out the audioformat of the file:
File file = new File("music.wav");
AudioFormat af = AudioSystem.getAudioInputStream(file).getFormat();
I don't know, why it doesn't work.
Please help me!
THANX
20 years ago
I have a problem with the outfit of JSliders. The setting knob of the basic JSlider is too big for my application. The width of the JSlider must be smaller than 10px. But then my setting knob is cut off on both sides.
I tried to change the setting knob by creating a SliderUI and painting an oval in the paint()-methode, but then I could not set values anymore. The oval had a confirmed position.
How can I change the setting knob? Does somebody knows a way?
PLEASE WRITE.
Thank you very much!
20 years ago
I want to draw a diagram in which graphic an JSliders are integrated, in order to select a special y-value to an x-value.
Bit this does not work. The JSliders appear everywhere I click and they aren't there they should be.
I think the problem is the combined usage of the methode paint() from Graphics and JComponents.
But I don't know how to manage it!
PLEASE help me oder tell me a possibility I could manage it on another way!
THANKS!!
20 years ago
Thank you for yout hint! But it doesn't work, too. Because ImageIcon needs a String, not an URL.
This is my Code:
private class LoadFile extends JPanel {
private JTextField openField = new JTextField("C:\\ ", 10);
private JButton loadButton = new JButton();
private LoadFile() {
setLayout(new FlowLayout());
loadButton.setIcon(new ImageIcon("load.gif"));
loadButton.setEnabled(false);
openField.setEnabled(false);
add(openField);
add(loadButton);
}
}
This error occurs:
ava.security.AccessControlException: access denied (java.io.FilePermission load.gif read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.SecurityManager.checkRead(SecurityManager.java:887)
at sun.awt.SunToolkit.getImageFromHash(SunToolkit.java:486)
at sun.awt.SunToolkit.getImage(SunToolkit.java:500)
at javax.swing.ImageIcon.<init>(ImageIcon.java:81)
at javax.swing.ImageIcon.<init>(ImageIcon.java:107)
at TPSimulator$LoadFile.<init>(TPSimulator.java:252)
at TPSimulator$Input.<init>(TPSimulator.java:152)
at TPSimulator.<init>(TPSimulator.java:34)
at Gui.<init>(Gui.java:48)
at SHSimulationsApplet.<init>(SHSimulationsApplet.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:566)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1775)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:495)
at sun.applet.AppletPanel.run(AppletPanel.java:292)
at java.lang.Thread.run(Thread.java:536)
Thanks for yout help!
20 years ago
Hi,
i�m trying to use gif�s ("load.gif" and "store.gif") in an applet, but it won�t work.
I got an "AccessControlException".
How can I fix these exception and use these gif�s for my applet.
Thanks
Sven
20 years ago