tomo black

Greenhorn
+ Follow
since Mar 01, 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 tomo black

hi stefan, thanks for your reply.
i was creating the multiple threads like so but i read that you shouldn't use Runnable for multiple threads. This wont compile properly (cant recognise NEW symbol) and i'm not sure how to fix it.


myThread implements Runnable;
int x;
while(true)
{
x= randomNo();
if(x%2==0)
new myThread(true);//even
else
new myThread(false);//odd
}
hi,
i'm hoping to generate a random number, check if it's even of not and pass odd/even as an arg to a newly created thread. but i dont quite understand how to do so( the thread part). i want to create dozens of threads.
can anyone help?

thanks tomo
hi,i have a JTree that displays the contents of a directory but i would like to know how to highlight each file type using different colors. e.g. .class is red, .java is yellow etc.
thanks for your help.
18 years ago
hi, just a simple question i think. when i open the dialog box, in the "Files of Type" it defaults to "All types". i would like to change this so that only one type of file is displayed. eg: .class
how is this done?
thanks in advance
18 years ago
hi, i have a progress bar that shows the completion of a task but it's not running like it should. the bar only moves when the task is completed, not during the task. do i need to implement the bar as a seperate thread or have i messed up in the coding
thanks in advance
18 years ago
hi, i have written a swing application which i would like be run when the user shutsdown their pc. However i dont have a clue how to tie it to the shutdown command. any ideas?
thanks in advance
18 years ago
hi, i have designed a GUI which accepts user input. i would like to be able to save these values, so that the next time the user runs the application, they do not have to re-enter those values again but can retrieve them from a menubar option.
i am not really sure how to go about this task. I was going to use java.util.Properties to do this. is this the right way to go or is there a better way?
any help would be much appreciated.
thanks in advance
18 years ago
hi, i have witten a GUI that requests user input. If the input is incorrect then a warning appears(using JDialog)to advise the user.
the problem is that if the user repeatedly enters incorrect input, then the same warning is produced many times. i would like for that warning to appear only once and for the GUI to become inactive until the warning message has been dealt with. At the moment the gui is still active when the warning is active.
i hope this problem is explained alright.
thanks in advance
18 years ago
hi, this might seem like a silly question but how do i get the time stamp for a particular file?
thanks
18 years ago
hi, i have written a swing application, which runs perfectly in college on XP and win2000 but when i try to run it at home, also on a win2000 os, it throws this error.
In the application if i use the default size then the application appears(at least the title bar does) but if i use "setSize(300,200);" or try to maximize it or drag it bigger then this error is thrown.
i've put it through google but it came up with nothing.
any ideas as to what it means? im using java1.5 beta
thanks
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d00b4f4, pid=564, tid=420
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0-beta-b32c mixed mode)
# Problematic frame:
# C [awt.dll+0xb4f4]
#
# An error report file with more information is saved as hs_err_pid564.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
18 years ago
hi, i'd like to replace the java coffee cup icon from the title bar of my application and replace it with one of my own. does anyone know how?
thanks
tomo
18 years ago