Manuel Moons

Ranch Hand
+ Follow
since Mar 05, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
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 Manuel Moons

If you have references to variables that can/may not be serialized you could use a "transient" variable:

eg.
private transient String password;

Transient variables will lose there value when trying to serialize them.

Hope this helps. I have not read your code, but it might solve your problem!
14 years ago
You can create classes which implement an interface or extend some superclass. They can have children (n) of the same type and perhaps a parent. Does this help you?

Eg.


Does this help you?

14 years ago
I'm not quite sure what you need but can't you just generate a java source file and compile it to a .class file?
14 years ago
Hey thanks,

I actually already came up with that solution myself. It worked. I attached a custom action to my cellEditor component and by doing that I made sure that it (the key) will not be forwarded to the table. So for other editors it will still work and I can handle my own TAB key.

15 years ago
Actually, it does not seem like JLayeredPane is giving a NullPointerException. According to the information specified by you it looks like JLayeredPane == null. Hence the first call on it will cause a nullpointer to be fired!

Maybe you should check how you are acquiring this and see in the javadocs how it should be acquired!
15 years ago
Hello,

Does anyone know how I can stop a tablecelleditor from losing focus when the tab key is pressed? I have an editor which contains 2 combo boxes. I want to switch between those 2 combos when pressing tab. At the moment the focus of the editor is lost. How can I fix this?
15 years ago
The code you are showing us is correct! (supposing that you have an mMoved(MouseEvent me); method)

I am thinking that there is something else in the class file where you got the snippet from that is causing your problem. If you have not located your problem at this time it might be better that you show us an entire class that produces the error (compilation error).
16 years ago
Ouch,

Not a simple requirement!

You actually want to build some sort of a mini-texteditor?

Although I'm absolutely sure that this is possible it will be a large and difficult task to create something like that. As far as I know it is not available in any standard API.

You might be able to find some library that has this functionality somewhere. I googled for you for a few minutes but I am not able to find something useful in that short time.

Well, I'm sorry if I have discouraged you but unless you have a lot of time to start creating a small text editor I would advise you to look for another solution. (Maybe something using images (table in an image)?)
16 years ago
Ah yes, Brian is right!

I forgot about that! The control key is a special key that can be checked using the "getModifiers" call!

My solution can also be used when you want to see if multiple keys are pressed simultanuously but when using the modifier keys (alt, ctrl, shift) it is not the most elegant solution.
16 years ago
Hello Adrian,

Take a look at the following link for an example on how to use JVLC.

JVLC example

Again, I have only played with JVLC for a short while. I'am not sure that it fits your needs. But it seems interesting!
16 years ago
First of all I have to say that I do not have an immediate solution for your problem.

I am wondering however why you are not using the Java API for VLC (JVLC). Maybe this will help you to have some more control over VLC.

But if you really want to do it like you are doing at the moment, some questions come to mind. Have you tried running the .sh script itself (without java program)? Does it work correctly?

Have you tried using the runtime without the .sh script? You can also execute the vlc command directly, maybe that solves the problem.

Sorry that I cannot be more helpful.
16 years ago
Every time a key is pressed a key pressed event is thrown. This means that you will actually receive an event for the F3 key AND another event for the Ctrl key.

What you want to do is remember that you pressed the "Ctrl" key and remember that you pressed the "F3" key. And test on that when the other key is pressed. When the key released event comes you must remove the pressed keys from your memory.

I don't know if this is clear enough for you. I will give a short example:

Step 1: Key pressed Event for the Ctrl key
--> you store the key (or set a boolean or ...)
Step 2: Key pressed Event for the F3 key
--> you check the previously pressed key (check the boolean or ...)
Step 3: Key released Event for the Ctrl key
--> now you switch back your boolean (the key is no longer pressed)

Hope this helps!
16 years ago
I'm sorry. I can't quite understand your problem!

You are trying to do conversions from pdf to doc and vice-versa? Ok

And I know you are trying to do this in your servlet. Right!

So what's next?

When you have succesfully transformed your document to another format (so you generated a new file) you will have to write the generated document to the browser using the servlet outputstream. (So just read the generated file using File IO), set the correct content type of the servlet outputstream (on the response object call setContentType)and write the file to the client (once again using the response object but now use the getOutputStream method).
17 years ago
Is the convertdoc tool in the path of your system?

What I mean to say is: When you start a dos-prompt and you type in convertdoc. Is the command known? If must be known to your webserver. So this means it should be in the path of the webserver (via the webserver startup batch-file or via the system path).
17 years ago