Trey German

Greenhorn
+ Follow
since Dec 05, 2002
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 Trey German

Please some one help please!! i beg u
15 years ago
I believe sun has software called MDIP it is a piece of software that converts j2me programs in to PRC files also www.datarepresentations.com has some software that does the same thing but costs money. ur on the right trach i too have a palm and have been working on doing the exact same thing. have fun
15 years ago
What goes in the place of filename.txt. when i try to put the name of the MIDI file i want to play they it gives me errors or is there a spot in the program i put the file name of the MIDI. I got this code from a book but the book didn't describe it to well THANX
15 years ago
I am now trying to add sound to my program and i am using this code
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class midi {

public static void main(String[] args) throws Exception {
JFrame frame = new JFrame("NoisyButton");
java.io.File file = new java.io.File(args[0] );
final AudioClip sound = Applet.newAudioClip(file.toURL( ));
JButton button = new JButton("Woof!");
button.addActionListener(new ActionListener( ) {
public void actionPerformed(ActionEvent e) { sound.play( ); }
});
Container content = frame.getContentPane();
content.setBackground(Color.pink);
content.setLayout(new GridBagLayout());
content.add(button);
frame.setVisible(true);
frame.setSize(200, 200);
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setVisible(true);
}
}
but when i try to execute it gives me this error:
"Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException at midi.main(midi.java:10)
whats wrong??? HELP!!
15 years ago
I'm trying to get the width/height of an image.
The image is named 'image'. I'm using image.getWidth(this); (same for height) and it returns -1. Anyone got any tips?
15 years ago
ok, thanks, thought of that myself
stupid!
15 years ago
I can't get mousePressed(MouseEvent e) mouseClicked(MouseEvent e) and mouseReleased(MouseEvent e) to fire. Anyone got any tips?
15 years ago
Also will the same code work in a java program, and if it doesn't sould you give me some that will
THANX
15 years ago
i got it working thanx
15 years ago
Yes. I believe it is in the correct directory.
15 years ago
Thanx for the code the applet looks like its working but now it just gives me a grey square when i open the applet. I have a feeling its just the computer i'm using but it is doing it on all the computers i've tried do you have any suggestions?
15 years ago
I'am having trouble putting images in my java applets can someone please send me some source code that works for sure. All the code that I've found doesn't seem to work. THANX
15 years ago