|
Advertisement
|
Forum posts by Matt Gerrans:Posted in Java Answers Forum, Aug 11, 2003, 6:23 PM
The solutions outlined on that page use MFC, which in this case provides little value for its bloat, as it offers no more simplicity than the underlying API.I think for a Java solution, I'd avoid MFC. Instead, do it with the API: just wrap a couple API calls (CreateMutex(), FindWindow(), etc.) into a little JNI class that does the trick.
Posted in Java Answers Forum, Aug 10, 2003, 8:02 PM
And maybe he read your post. ;-)
Posted in Java Answers Forum, Aug 8, 2003, 2:40 PM
You guys are being so harsh. Joan clearly did the hard work of substituting the word "patient" for the word "student" before posting this technically challenging and purely work-related problem.Joan, I'm sure you've already implemented this in J2EE. Perhaps you were interested in implementing it as a Jini service instead, or something like that?
Posted in Java Answers Forum, Aug 8, 2003, 12:22 PM
> Up front here I want to admit that I am a newbie Java> programmer and make no claims to being an expert.> > That said, couldn't this be solved by making it a> singleton?Nope. A singleton would be single-instance in on each JVM, not on the machine (or the OS, as it were).Usually, when you launch an app, a whole new JVM process is created to...
Posted in Java Answers Forum, Aug 8, 2003, 10:38 AM
> > ...unless your program - or the operating system -crashes> > and the lock file isn't deleted. > If the O/S or JVM crashes you have bigger problems...I think having the file there is a bigger problem than a JVM crash, because that means the app can't start up again. There is a power switch (or plug!) on many computers these days and I'm sure...
Posted in Java Answers Forum, Aug 7, 2003, 2:33 PM
If a "user input" some string of numbers, then it is already a String, not a long. Therefore all you need to do is keep the first 8 characters of that string (and convert that to long, or not, as you wish). You may want to do other things like remove spaces, commas, etc., as well, by the way.Maybe you could show a little of your code to...
Posted in Java Answers Forum, Aug 7, 2003, 11:04 AM
> I just want to ask whether can straightly changing the> gamma setting or display setting of the windows? no need> to call up the display panelEssentially, the answer is no if you are not already a Windows expert. Messing with video and monitor settings is a very complicated and tricky thing and would all need to be done in C/C++ via JNI. See...
Posted in Java Answers Forum, Aug 6, 2003, 11:31 AM
> On the other hand; it receives no junk mail -> perhaps for the same reason.Wow, I think I'll change my name to Matt O'Gerrans!(Actually, I just got SpamBayes (http://sourceforge.net/projects/spambayes/) set up and it works like a charm, so it looks I won't need the name change)It is sort of amazing to me, that even today, programs have all...
Posted in Java Answers Forum, Aug 6, 2003, 10:17 AM
On windows, it is a matter of using a mutex. This is a pretty common practice in Windows apps that want to be single instance and behave how you described:1) On startup, before creating your main window, try to create the mutex, if it succeeds, proceed normally.2) If it fails, do a FindWindow() on your own window class and send a custom Windows...
Posted in Java Answers Forum, Aug 6, 2003, 9:56 AM
What version of Windows?Executing "Control %windir%\\system32\\desk.cpl" (%windir% being the environment variable that tells you where windows is installed) on a recent version of windows, that should pop up the display settings control panel.
Posted in Java Answers Forum, Aug 5, 2003, 1:04 PM
By the way, in the Java, wouldn't it be simpler and clearer to read into an ArrayList then, if necessary, convert that to an array?
Posted in Java Answers Forum, Aug 5, 2003, 12:59 PM
Or use Jython:linesArray = file( filename ).readlines() ;-0
Posted in Weblogs Forum, Jul 30, 2003, 1:48 PM
I've always had the habit of representing data this way (I don't remember whether I learned this habit somewhere, but it just seems simpler to me). That's why it took me a while to understand what the big Y2K problem was. It didn't make sense to me that there would be any problem, because I was thinking that date would be stored as the number...
Posted in Java Answers Forum, Jul 25, 2003, 10:45 AM
If you are trying to get the behavior of both classes, then use Greg's suggestion.If you are trying to get the implementation of both classes, then you probably want to use composition. I don't have any links for that, but searching for "Java and composition" or similar things on this site, or on Google should turn up plenty of material.
Posted in News & Ideas Forum (Closed for new topic posts), Jul 24, 2003, 3:21 PM
That is a bit silly and arbitrary. You might just be filtering for people who like to doodle. It is pretty unfair to filter people by how you like to work. It is not unlike the whiteboard criteria (which I think was already mentioned). I'm sure there are plenty of people who like to sketch things out, but still end up cranking out crap.I much...
|