I'd like to see how the code is organized and how the various GUI design patterns are applied. Anything Java and in desktop gui style is fine: GWT, Swing, SWT. Thanks.
I was reading an article on handling Out Of Memory error conditions in Java (and on JBoss platform) and I saw this suggestion to reduce the size of the threadstack. Can anyone explain how "reducing" the size of threadstack will help with a max memory error condition?
http://community.jboss.org/wiki/OutOfMemoryExceptions
I am using a ServerSocket port to run one instance only of my Java Swing application, so if a user tries to open another instance of the program, i show him a warning that "Another instance is already open". This works fine, but instead of showing this message i want to set focus on the running application itself, like some programs does (MSN Messenger), even if it was minimized.
Is there a solution for this for various operating systems ?
I am creating my java Swing application in Netbeans. At present there are more than 2000 lines of code. Is it right to have these many number of lines in a single file. Moreover the IDE has become slow when i am editing this file. Is there any way to overcome this?
Hello,
I am working on a geographic project in Java.
The input are coordinates : 24.4444 N etc
Output: a PLAIN map (not round) showing the point of the coordinates.
I don't know the algorithm to transform from coordinates to x,y on a JComponent, can somebody help me?
The map looks like this:
http://upload.wikimedia.org/wikipedia/commons/7/74/Mercator-projection.jpg
Thank you
There are several tools to build java projects:
ant
mvn
ivy
buildr
...
From my experience Ant is great for small projects and projects with special build requirements.
Mvn is great for large but typical projects without too much special requirements. It also seams better for open source than for commercial projects.
What would you recommend in case of large, enterprise, commercial projects ?
What do you currently use and what would you rather use and why ?
I stumbled upon multi_index on a lark last night while pounding my had against a collection that I need to access by 3 different key values, and also to have rebalancing array semantics. Well I got one of my two wishes (3 different key values) in boost::multi_index.
I'm curious if anything similar exists in the Java world.
Does Java have any functionality to generate random characters or strings? Or must one simply pick a random integer and convert that integer's ascii code to a character?
Say suppose i am running a java program through command line. and this program requires some data to enter during the execution. So i was wondering on what happens if somebody uses javaw to run this type of program? that is how can enter the data to the program.
How can we keep track of every message that gets into our Java Message Queue? We need to save the message for later reference. We already log it into an application log (log4j) but we need to query them later.
Please tell me how to write wsdl file of service developed in java. For example:
package fromjava.server;
import javax.jws.WebService;
import javax.jws.WebMethod;
@WebService
public class AddNumbersImpl {
@WebMethod(action="addnumbers")
public int addNumbers(int number1, int number2) {
return (number1+number2);
}
}
this is a web service....so what will be the corresponding wsdl file? if u guys have any tutorial then please help me out.
Hi,
What is the need of Collection framework in Java since all the data operations(sorting/adding/deleting) are possible with Arrays and moreover array is suitable for memory consumption and performance is also better compared with Collections.
Can anyone point me a real time data oriented example which shows the difference in both(array/Collections) of these implementations.
Thx
What's the quickest way to remove an element from a Map by value in Java?
Currently I'm using:
DomainObj valueToRemove = new DomainObj();
String removalKey = null;
for (Map.Entry<String, DomainObj> entry : map.entrySet()) {
if (valueToRemove.equals(entry.getValue())) {
removalKey = entry.getKey();
break;
}
}
if (removalKey != null) {
map.remove(removalKey);
}
I have a textfile which my Java program is modifying and putting into an HTML file for display.
However, this textfile contains lots of HTML unsafe characters such as "<" and the "" which would need to be encoded into & gt; (sans space) and & lt;.
Is there some library method I can use to sanatize my text document to replace all these HTML special characters with their safe encoded equivelants?
How can I get video and audio streams from web cameras with Java (in a cross-platform way)?
For example, we have a computer with 3-4 USB web cameras; we want to get their streams and make them visible in the user interface. How can we perform such a thing?
I am looking for something like a portal, or a community where everybody posts their contributions in Java.
Ex. polynomial calculations, ...
Scenario: Search - "polynomial" - download package (source code)
Thank you.
Is there any way in Java to enforce a minimum window size?
The last article I can find is from 1999, and has some complicated code to mimic the behaviour...
http://www.javaworld.com/javaworld/javaqa/1999-10/03-qa-window.html
Surely there is a simple method that can be used?
I am just wondering if it's possible to I cancel "Drag and Drop" operation in Java/Swing programmatically? So the effect would be similar to if the user pressed the "ESC" key?
I was expecting DragSourceDragEvent or DragSourceContext to have a cancelDrag() method, similar to DropTargetDragEvent which has acceptDrag() and rejectDrag() methods (both of which does not do what I want).
I am missing something?
I'm looking for a good general library to grab localized labels for displaying on a web page. I've found some useful solutions at http://stackoverflow.com/questions/19295/database-backed-i18n-for-java-web-app and I will use them but I wanted to see if there was a standard library other than the fmt jstl tags that is already database backed.