Matt Wil

Greenhorn
+ Follow
since Apr 05, 2004
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 Matt Wil

Hi,
Does anyone know of a free/open source Thesaurus available for use in Java applications?
Thanks,
Matt
13 years ago
J2ME has a method called CollidesWith() that can do collision detection at the images pixel level. Anyone know if there is a similiar method available in Java SE?
13 years ago
Anyone know how to get the Sun Wireless Toolkit "Profiler" to work with a Nokia Emulator? The Nokia Emulator runs, but afterwards no Profiling info is displayed.
14 years ago
I have the exact same problem as Hank.. Here is the slow code:

long timeSinceStart = (cycleStartTime - System.currentTimeMillis());
if (timeSinceStart < MS_PER_FRAME){
try {
Thread.sleep(MS_PER_FRAME - timeSinceStart);
} catch(java.lang.InterruptedException e){}
}
14 years ago
I run Eclipse on my Mac iBook g4 800.. runs okay.. can be a little slow at times.
16 years ago
hmm.. adding the lines below under the line "out.close();" causes this to work. Aren't the lines below just reading the text and writing to the Java Console? I thought the lines above did the actual writing to the text file?

BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));

String inputLine;

while ((inputLine = in.readLine()) != null) System.out.println(inputLine);

in.close();
16 years ago
Hi,
Here is the code.. I think it actually worked one time(didnt work again though)... Also, should I be using the second line(the one I have remarked out) for my String? Thanks!

try{

String inputString = "JustaTest";
//String inputString = URLEncoder.encode("blah blah","UTF-8");

URL postURL = new URL("http://www.example.com/App/LogCustomization.php");
URLConnection connection = postURL.openConnection();
connection.setDoOutput(true);

PrintWriter out = new PrintWriter(connection.getOutputStream());
out.println("inputString=" + inputString);
out.close();

}catch(MalformedURLException e){System.out.println("Malformed URL Excpetion Thrown");

}catch(IOException e){System.out.println("IO Exception Thrown");
}
16 years ago
Hi,
Can anyone show me a few lines of code on how to POST a varible from an applet to a PHP page? My PHP page accepts a varible and writes to a text file. I need to get a variable named "inputString" from the applet to the PHP script. I've tried a few different thing on the web but havent had any luck.
Thanks!
16 years ago
Hi,
I need to pass values from my Applet to a PHP script on a web server. The script will take the values and insert them into a mySQL database. Are there any tutorials on how to call a PHP page and pass values to it? Will a web browser open when this happens(i would prefer it not).
Thanks,
Matt
16 years ago
Hi,
I am trying to change the color of my java applet.. I am able to change everything except the color of the divider bar in my SplitPane. I read about using this inside the splitpane:

setBackground(Color.RED);

This only changes a thin line at the very top of the divider bar to red. How do I change the entire divider bar to a color?

I have already tried this with the same results as above:

((BasicSplitPaneUI)mySplitPane.getUI()).getDivider().setBackground(Color.RED);

Thanks!
16 years ago
Hi,
I know applets are not as popular as they used to be but are they dying out? I have heard that they are still used by mainly in controlled settings such as inside businesses.
Thanks
16 years ago
Hi,
Has anyone got a code sign certificate from Thawte before? Filled out the info for a code sign cert.. seems strange though. It lists your name as the 'domain' and the instructions tell you to generate a CSR from your web server... I've always done this from my pc where the applet was programmed and I assume that is the correct way? Is this just because they mainly do SSL certs for web sites?
Thanks!
16 years ago
Is there any way to apply a color to all Swing components rather than doing it one at a time for every panel and button I have?
16 years ago
Hi,
I have a JPanel where I am trying to display a JLabel(named loading) that displays the text "Loading..." while I am waiting for a jpeg to load. When the image is done loading, I want it to display the image, and then remove the JLabel that displays "Loading...". This doesnt work however.. my code seems to display the text, hide it and display that image all at once. You never see the Loading text. My code is below. Will my mutliple calls to repaint not work as intended?
void loadAdSelectPreview(){

//display text "Loading..."
adDownloaded=false;
loading.setVisible(true);
repaint();

//display Image, hiding "Loading..."
try {
URL url = new URL("http://www.example.com/AdMakerApp/ImageData/" +
AdMakerApp.adPreviewObject.getAdFilename() + ".jpg");

imgIcon = new ImageIcon(url);
img = imgIcon.getImage();
}catch(Exception e) { }//change to specific exception later

adDownloaded=true;
loading.setVisible(false);
repaint();
}
16 years ago