Reputation: 0 Apprentice
- New Members
- Active Posts:
- 9 (0.02 per day)
- 20-December 12
- Profile Views:
- Last Active:
- Aug 06 2013 10:37 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 1 Apr 2013Well, maybe you know better than me.
If you would enlighten me as to why you would put your program into a static context, I'll listen intently.
because it evades non-static contexts, and i like being static
static is fun
you never change
you know the point where everyday of your life is the exact same
over and over and over, recurring the same pattern until one day you drop dead of demise
it's the same routine
i fixed it just by putting it in a thread, thanks
Posted 31 Mar 2013I believe error #1 is a result of there being no method called 'getLengthOfTask()' in your Task class or the SwingWorker API. You can define what you want that method to do in your SwingWorker child class.
Error #2 is caused by passing the wrong arguments to 'addPropertyChangeListener()'. I don't have a solution for you on that one, but seems like solving this and solving Error #3 are closely related. The answer might be in here.
Aside from your errors, I think you're setting yourself up for disaster because your runnable is being initiated in a static context. I would instead use Thread t new Thread(new UpdateMechanism);t.start(); in main(). UpdateMechanism would obviously need to implement Runnable, move 'showGUI()' to an overridden 'run()' in UpdateMechanism and then you can remove all of your methods and components from a static context.
Finally, my IDE is also warning that your FileOutputStream is never closed, which could cause a data leak. Make sure you always close the streams you open.
so you're saying i should ditch my swingworker
and go for threads
are you serious
Posted 19 Mar 2013Create a font from the file and assign it with setFont(). I believe the constructor you used there is used to only specify a font family, "Arial", etc.
Fixed it before you replied. Sorry for wasting your time.
I love you in the weirdest way for fixing my original problem though. I'm too weary to do anything tonight. Thanks much.
Posted 19 Mar 2013Your immediate problem is simple, this line.
int fontSizeToUse = Math.min(newFontSize, componentHeight);
The JLabel headerLabel has no size until you specify one, or until it assigned one by a layout manager, thus fontSizeToUse will always be zero.
You can remove lines 30 and 31, because you have already done exactly what they do on line 17. Actually, I don't see a need for lines 17 through 32.
Thanks! Lines 17-32 will be needed later in the code. Now, I'm having a bit of trouble with the font. It's just normal text, as stated in the OP.
Posted 22 Dec 2012Thanks much ishkabible, but how would you parse the send()? Would you do so on the irc server's host or would you do it via client?
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
cygorx hasn't added any friends yet.