java

How do you implement position-sensitive zooming inside a JScrollPane?

I am trying to implement position-sensitive zooming inside a JScrollPane. The JScrollPane contains a component with a customized 'paint' that will draw itself inside whatever space it is allocated - so zooming is as easy as using a MouseWheelListener that resizes the inner component as required. But I also want zooming into (or out of) ...

Looking for a Swing Run-In-Background GUI library

Most modern apps provide an interactive way to push a long running operation onto a background queue. I am developing a swing application and I have implemented a simple "framework" to support that. However, I can't help but think that something like that must exist already. I have heard that Netbeans provides that, but I don't want to m...

Does it matter which vendor's JDK you build with?

If I'm deploying to servers with WebSphere 6.1 (Java 1.5), should I use IBM's JDK on my build box? Or will Sun's JDK compile to the same binary? If I should use IBM's, where can I get the Windows x64 version? ...

How to add /usr/share/java libs to webapp's classpath?

Summary Is that possible for webapps deployed on linux + tomcat5.5 to use/see all /usr/share/java/ jars automatically? Details I'm packaging my java webapp for Ubuntu (yet the question is related to any linux-based distro) and going to make it depend on tomcat. I'm going to put context descriptor (an xml file) to /usr/share/tomcat5.5...

My Java factory method smells. How do I fix it?

There's something very unsatisfactory about this code: /* Given a command string in which the first 8 characters are the command name padded on the right with whitespace, construct the appropriate kind of Command object. */ public class CommandFactory { public Command getCommand(String cmd) { cmdName = cmd.subString(0,8)....

Fast search in java swing applications?

I'm wandering myself what component is the best for displaying fast search results in swing. I want to create something like this, make a text field where user can enter some text, during his entering I'll improve in back end fast search on database, and I want to show data bellow the text box, and he will be able to browse the results a...

How do you specify a port range for Java sockets?

In Java you can give the number zero as a single parameter for the Socket or DatagramSocket constructor. Java binds that Socket to a free port then. Is it possible to limit the port lookup to a specific range? Thanks in advance, Roland ...

Duplicate Oracle DES encrypting in Java

I recently asked a question about Oracle Encryption. Along the way to finding a solution for myself I decided to move the encryption (well, obfuscation) to the application side for certain tasks. My problem is that the database is already encrypting data a certain way and I need Java code to duplicate that functionality, so that text...

How to send Ctrl-Break from Remote Desktop Connection Client?

I am connecting to a Windows XP machine via Microsoft's Remote Desktop Connection Client, version 2.0.0 Beta 3, running on a Mac. On the Windows machine there is a Java console running, where I want to send a Ctrl-Break so I can see the Java threads running. According to the RDC help, Alt/Option-F3 is break, but Ctrl-Opt-F3 and various ...

Code compiling in eclipse but not on command line

I once wrote this line in a java class. This compiled fine in eclipse but not on command line. my eclipse version was 3.3 and JDK version was 1.5, on Win XP professionsl. any clues? Error on command line is Icons.java:16: code too large public static final byte[] compileIcon = { 71, 73, 70, 56, 57, 97, 50, ...

How to avoid type safety warnings with Hibernate HQL results?

For example I have such query: Query q = sess.createQuery("from Cat cat"); List cats = q.list(); If I try to make something like this it will show warning "Type safety: The expression of type List needs unchecked conversion to conform to List": List<Cat> cats = q.list(); Is there a way to avoid it? Thanks. ...

A more advanced table/spreadsheet SWT implementation

I'm developing an application based on Eclipse's Rich Client Platform that relies heavily on the use of tables for showing and editing data. I'm currently using the SWT implementations of Table and TableViewer. My users are forever complaining that it "doesn't work like in excel". Most notably, I can't select a single cell within a row...

What is the best method to capture images from a live video device for use by a Java-based application?

I am looking into an image processing problem for semi-real time detection of certain scenarios. My goal is to have the live video arrive as Motion JPEG frames in my Java code somehow. I am familiar with the Java Media Framework and, sadly, I think we can consider that an effectively dead API. I am also familiar with Axis boxes and,...

Indirectly referenced from required .class file

Hi, I'm getting an error message when I try to build my project in eclipse: The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced from required .class files I've looked online for a solution and cannot find one (except for those sites that make you pay for help). Anyone have any idea of a...

Java garbage collection on VMWare servers

Has anyone experienced issues with Java's default garbage collector while running apps on VmWare instances? I am experiencing issues where full garbage collections are not running as often as I would expect and am curious if the VmWare variable has anything to do with it. ...

jasper reports, hiding columns at runtime

Hi, I have a Jasper report template, and I need to show/hide a column at runtime based on a particular condition. I'm using "Print when expression" to conditionally show/hide this column (and it's header) in my report. When the column is hidden, the space it would have occupied is left blank, which is not particularly attractive. I wou...

Do you keep your project files under version control?

Do you keep project files like Eclipse's .project, .classpath, .settings under version control (e.g. subversion)? ...

How do you handle developer individual files under version control?

Some files in our repository are individual to each developer. For example some developers use a local database, which is configured in a properties file in the project. So each developer has different settings. When one developer commits, he always has to take care to not commit his individually configured files. How do you handle this...

ArrayList in Java and inputting

I'm used to python, so this is a bit confusing to me. I'm trying to take in input, line-by-line, until a user inputs a certain number. The numbers will be stored in an array to apply some statistical maths to them. Currently, I have a main class, the stats classes, and an "reading" class. Two Questions: I can't seem to get the input l...

Java ME UI libraries

Guys, I'm developing a Java ME app & need pointers to some really good UI libraries. I did see a few such as JavaME Polish. Are there any more out there? For e.g. ebuddy's java ME app has an amazing UI and so is gmail's java ME app. What libraries would they have been using or would have they have developed it on their own? Please help ...