Most of the desktop application development I do is in Swing, and I'm curious to hear people's thoughts on using JavaFX and/or Adobe Flex for building desktop applications. Have you had success building desktop apps with these? Or would you stick with Swing for now and use tools to help make Swing development more productive?
...
I'm using Apache HttpComponents Client to POST to a server that returns JSON. The problem is that if the server returns a 400 error, I seem to have no way of telling what the error was from Java (had to resort to a packet sniffer so far - ridiculous). Here is the code:
HttpClient httpclient = new DefaultHttpClient();
params.add(new Basi...
Hi Guys,
A little advise please.
I am trying to create a tree out of following rows of data:
TOP Level1 NotLeaf
Level1 Data1 leaf
TOP Level11 NotLeaf
Level11 Level2 NotLeaf
Level11 Data4 leaf
Level2 Data2 leaf
Level2 Data3 leaf
The last column shows whether a node is a leaf...
I'm a newbie in Java so please bear with me if this is a very easy problem. I have a JUnit Test where I have a hardcoded Japanese word assigned directly to a string variable. Now right after that string is assigned, it turns to "??" meaning that the encoding is incorrect somewhere.
public class TestTest extends TestCase {
public void...
Hi,
Given a string s and an array of smaller strings, T, design a method to search s
for each small string in T.
Thanks.
...
I have the following code :-
public class Test5 {
private int value ;
public static void main(String[] args) {
Test5 a, b;
a = new Test5();
b = new Test5(){{ value = 1 ;}};
}
}
The following line shows an error :-
b = new Test5(){{ value = 1 ;}};
non-static variable cannot be referenced from a s...
Greetings,
In the application that I am working on, I have a long-running process (DNA analysis). Users can send requests, and I am thinking of queuing the requests in a JMS queue, then processing the requests in the queue accordingly. Then, the result is emailed to the particular user.
However, an admin should be able to change the ...
How to get the data reference/index in Linked list?
e.g. if I have this linked list
java.util.List<Polygon> triangles = new LinkedList<Polygon>();
polygon triangle, selectedTriangle;
Point startDrag,endDrag,midPoint;
....
triangles.add( new Polygon(xs, ys,3));
e.g. How can I set the Polygon selectedTriangle as the same with one of ...
Hello, I need to check if some option which can be passed to JVM is explicitly set or is it have default value.
To be more specific: I need to create one specific thread with higher native stack size than the default one, but in case then user want to take care of such things by himself by specifying -Xss option I want to create all thre...
Hi,
I'm trying to extract POP3 valid email content using this regular expression.
I have removed the entire content of <script> ... </script> and <style> ... </style>.
I have converted every <br> tag into "\n".
I have removed all HTML tags and extracted all email content into a string using regular expressions such as
regex = "<[^>...
Possible duplicate: When and how should I use a Threadlocal variable
The purpose of ThreadLocal as given here states that the variable is local to any Thread accessing an object containing the ThreadLocal variable. What difference does it make, in having a ThreadLocal variable as a member of a class and then making it local to a Threa...
I am i have one Logging web service in my project which gets called form another web service.
I am calling a logging web service using a wrapper method which points to the web service method.
When i am accessing it using client-webservice structure i am not getting any exception.
But the problem is when i am accessing it form web serv...
Is there any software or library available to draw screws in 3 dimensions in C, C++, Java, or Ruby?
...
It displays like To run this application from the command line without Ant.
How can i solve this problem?
...
Is there any way to unload a DLL which gets loaded in the application using System.load() API call.
...
Hi I have this grammar for now,
but when I have after a service, a note. Antlr doesn't want to recognize that it's not the service, but note. And service and note have different structure.
How to write this?
I'm trying to parse this. but NOTE bla bla; is in service
777014322;O2 Optimum Profi Promo;
Free sms;0:00;250:00;0:00;
NOTE b...
1) There is Somelib which is added as jar in SomeProject.
2) In SomeProject there is the somePackage.SomeClass which implements SomeLib.SomeInterface.
3) SomeLib must be able to create somePackage.SomeClass instance without building SomeLib each time
How is it possible without using reflection? It's impossible to write in SomeLib some...
How to calculate the Network Bandwidth using Core Java Any pointers
...
my installanywhere project has swing window with Next, back, etc. buttons and now these look broken (there are no surrounding frames) with my new Win7 machine.
Any ideas how to fix these? I believe it happens since JAVA reports itself now "Windows 7"
note: AWT buttons work OK
...
Recently i get in touch with Empire-db. The project doc. stated that they are using "string-free coding", intended to use less constant strings as possible to avoid typos and use the force of the compiler.
I was always a big fan of this principle, because i think as Java is a formal language it could be expresive for configuration like...