Skip to content
Advertisement

java – detect mouseReleased without mousePressed

I have a MouseListener on a component and want to listen to mouseReleased events, without needing mousePressed events. How can I detect if the user presses on another button, the desktop, or other …

Pass Hidden parameters using response.sendRedirect()

How would I pass hidden parameters? I want to call a page (test.jsp) but also pass 2 hidden parameters like a post. Answer TheNewIdiot’s answer successfully explains the problem and the reason why you can’t send attributes in request through a redirect. Possible solutions: Using forwarding. This will enable that request attributes could be passed to the view and you

Java catch block, caught exception is not final

I am checking out the new features of Java SE7 and I am currently at this point: http://docs.oracle.com/javase/7/docs/technotes/guides/language/catch-multiple.html regarding the catch multiple feature, when I came across this statement: Note: If a catch block handles more than one exception type, then the catch parameter is implicitly final. In this example, the catch parameter ex is final and therefore you cannot

Java object, changed fields listener, design-pattern

There is a class: Then we update some fields How can I know which fields of MyClass were tried to be changed (invoked, in the example above field1 and field2)? What is the best solution for that? Maybe some design-pattern? One option is to create HashSet of changed fields for this object as an additional property and update it inside

How to use OpenGL in JavaFX?

I want to write a very simple Java 3D editor(for experiment). I know the basic JavaFX usage, and I know enough OpenGL knowledge. But all my OpenGL experience is from working with C/C++. Could I make a ‘canvas’ in JavaFx application and map OpenGL viewport on it? Answer Internally, JavaFX can use OpenGL as a rendering pipeline, so some care

Where is the Java SDK folder in my computer? Ubuntu 12.04

I know it’s installed because when I type: I get: And when I type: I get: What worries me about the first item in the list is that the 2012a folder is my MATLAB folder and not a standard ‘usr/lib’ folder. I’m really confused on where the JDK and JRE got installed, because I need to set the $JAVA_HOME path

Call Java function using .Net(C#)

is it possible to invoke function which is written in Java using WCF or any class application written in C# .net Can it be possible by using webOrb.. i can’t find enough information about Java to .Net remoting.. Answer If you want to communicate between C# and Java you have a couple of options. The cleanest: Build a service. This

How to sort file names in ascending order?

I have a set of files in a folder, and all of them starting with a similar name, except one. Here is an example: I am able to list all the files from the specified folder, but the list is not in an ascending order of the spectrum number. Example: I get the following result when the program is executed:

Advertisement