I have an application that needs to support a multilingual interface, five languages to be exact. For the main part of the interface the standard ResourceBundle approach can be used to handle this.
However, the database contains numerous tables whose elements contain human readable names, descriptions, abstracts etc. It needs to be pos...
I'm working on a little Java game in which all sorts of events can happen. There are at least a couple of dozen basic events that various event handlers may be interested in. There are also several places in the code where these events might be triggered. Rather than forcing the event listeners to know which class they need to registe...
I have created a custom ExpandableListAdapter and everything works properly. What I'd like to be able to do is in each of the groups add a different type of child to the end. I have tried adding 1 to the getChildrenCount() number and then testing isLastChild in the getChildView() method, but that doesn't seem to work.
If a group has thr...
Hi,
What is the best approach for defining Interfaces in either C# or Java? Do we need to make generic or add the methods as and when the real need arises?
Regards,
Srinivas
...
A number of swing text components will interpret HTML. I'd like to style this HTML with CSS if possible. Any one know how to do this?
...
Hi I have something like the following that makes a URL Connection
and retrieves the data. The problem
is that when I hit a page that
requires authentication first I get
the login page. I'm unsure of how to
pass a username and password in the
URLConnection. I'm hitting a site
that is using JAAS authenticaiton.
i...
How can i bundle a stripped down JVM to run just my application?
i would like to strip down the JVM so that i can include it in my application. I know that exe wrappers can do this but what i would like to know is how? so that i can script it and create bundles for multiple OS's not just Windows.
...
JFileChooser looks nothing like the native widget. I seem to remember reading some hack to get it look like the native widget but searching for it know i can't seem to find it again i came across posts that suggest using java.awt.FileChooser but that class does not seem to be in the distribution. How can i make JFileChooser make look lik...
Hi,
I'm trying to make a login page in Struts. The idea is to validate if the user exists, etc, and then if there is an error, return to the login page with the errors in red (the typical login or any form page validation).
I would like to know if someone knows an errors management tutorial in Struts. I'm looking specially for a tutori...
I'm wondering if util code already exists to implement some/all of *NIX tail. I'd like to copy the last n lines of some file/reader to another file/reader, etc.
...
I am well aware that generic types are erased from Java code when it is compiled. What information (attributes?) do 1.5+ JVMs use to implement getGenericType , etc. ?
...
Well, I'm barely beginning to get involved in this subject.
I've found this pretty detailed tutorial, but it seems a little outdated.
Besides I guess that in Java 6 Metro is the way to go (am I right???)
What are the frameworks, books and online resources to to investigate/read?
Edit:
Another pretty good tutorial, with Metro's WSIT i...
OK, so I see that there are a few articles for transitioning from PHP to Java, but I am going the other way around.
I have experience with developing with C# and Java applications (these languages have roughly similar architectures).
I have recently begun to work with PHP, and there are a few things which seem very unusual from the JA...
I know maybe the answer to the question is obvious. But if anybody can give me a definitive answer, that would be helpful.
The question is : whether the java NIO package can provide some memory consistency assurance?
The scenario is :
Thread A Thread B
[modify Object X] ...
I want to obtain longest path in a given Java code. This code might be present in form of a graph. Are there any opensource tools/ APIs that obtain this info ?
...
Hi,
I'm working on an application that has to proccess audio files. When using mp3 files I'm not sure how to handle data (the data I'm interested in are the the audio bytes, the ones that represent what we hear).
If I'm using a wav file I know I have a 44 bytes header and then the data. When it comes to an mp3, I've read that they are ...
For example, we have two domain objects: Cell and Body (as in human cell and body).
The Body class is just a collection of Cells, e.g.
class Body
{
IList<Cell> cells;
public void AddCell(Cell c) { ... }
public void RemoveCell(Cell c) { ... }
}
The Cell has a Split method, which internally creates a clone of itself, e.g.
...
I have a program I ported from C to Java. Both apps use quicksort to order some partitioned data (genomic coordinates).
The Java version runs fast, but I'd like to get it closer to the C version. I am using the Sun JDK v6u14.
Obviously I can't get parity with the C application, but I'd like to learn what I can do to eke out as much pe...
My objective is to get the DeptNames of certain employees from the Emp table. But the number of employees is varying. Please tell if the below approach is correct and which of the below approach is better performance wise. Or is there a better way to go about it?
PreparedStatement pstmt = conn.prepareStatement("SELECT Dept from Emp WHER...
I need to manage long running TCP socket connections to an external server from my Java application. I'm looking for a good socket pool so I will be able to re-use the sockets. Are there any suggestions?
...