Hi, I need to pass an object (my own business object) between two tables in one page. The value is got from the getter call in one fixture and then should be used as field in another fixture (both ColumnFixtures). Please note that the object to be passed is neither primitive nor String and the conversion is not that simple. Is it even po...
I'm looking for a simple line or two of code that will grab an rss feed like this php line:
$feed = "URL"
from within a scala object.
I'm using scala/lift with Netbeans or Eclipse if it's relevant
...
I am implementing WS-Security using WSS4J and I'm trying to incorporate some support form of authorization.
I have a global handler, defined in the <requestFlow>, which executes before every service. I need to determine, through the Axis MessageContext or otherwise, what class is mapped to the requested service. I want to delegate to ...
I've customized a JPanel that displays a large, complicated diagram. Depending on the size of the data, it can take a few minutes to render in paintComponent(). I'm looking for a strategy to:
draw the component without tying up the event dispatch thread.
draw something in the JPanel to let the user know the image is being rendered.
pe...
The use case is this:
public void testMethod(String para1, String para2, String para3){
if(para1==null){
System.out.println("para1 cannot be null");
}
if(para2)...
}
As the check null code above, we will be repeating ourselvous on writing the same code to check every parameter. But we cannot really factor out a common...
I am trying to make a class in Java that builds an object of type Action which holds three ints and returns it to my other class in the array history, where history is an
array of type Action. When it is called I immediately get an endless loop; hence the stack overflow.
Error - I printed 1 line, it goes on...
Exception in thread "main...
In netbeans it is possible to add a canvas to your app, however it does not seem possible to draw on the canvas because you need to overload the paint(Graphics) method. What is the best way to do this? Thanks!
...
I am using PDF documents for various purposes using iText library.
Its like once class per PDF document. In a way there are a lot of similarities among the classes and the same have been listed below:
The fields have (x,y) location
The field can be wrapped after some no. of words
A field can have a value which is a function of one or ...
The default behavior of Object.hashCode() is to return essentially the "address" of the object so that a.hashCode() == b.hashCode() if and only if a == b. How can I get this behavior in a user-defined class if a superclass already defines hashCode()? For instance:
class A {
public int hashCode() {
return 0;
}
}
class B extends...
How can we resolve a message from properties file? Just like when we use
errors.reject ( "xyz.abc" );
in this case "xyz.abc" is resolved from the property file specified in messageResource ( servlet.xml )
...
java -Djava.library.path=../lib
-classpath ../lib/wrappertest.jar:../lib/wrapper.jar:Service.jar:../lib/mysql-connector-java-3.0.17-ga-bin.jar
-Dwrapper.key=Ksxtsmvr7iAmVJ-T
-Dwrapper.port=32001
-Dwrapper.jvm.port.min=31000
-Dwrapper.jvm.port.max=31999 -Dwrapper.pid=1731
-Dwrapper.version=3.3.0
-...
...and that's wrong.
Here's the error I get:
BUILD FAILED
C:_TraderPlatform\Clients\Open\Open\Java\Applets\PPDataTransporter\nbproject\build-impl.xml:338: The following error occurred while executing this line:
C:_TraderPlatform\Clients\Open\Open\Java\Applets\PPDataTransporter\nbproject\build-impl.xml:158: Unable to find a javac compil...
I'm just starting my first Java Swing project(doing mainly web-based apps before) and try to understand how to build a proper architecture with separation of concerns between the MVC components.
Just about any documentation I find goes very deep into the details of how each and every Swing UI widget works and can be used, but all exampl...
Scenario:
I have a container object which holds a mixed bag of objects all inheriting from the MyContainedObject class. Consumers of the container class do not have direct access to contained objects, but my be interested in knowing when they change.
Design Decision:
What's the best way to listen for ChangeEvents on a specific class ...
I need to develop a service (either WCF or Java) that can take multiple single-sheet Excel files and combine them into a single Excel workbook with multiple sheets. The Excel files are actually exported from crystal reports as individual files. Following are some of the requirements of the service:
1) Should preserve all the formatting...
Hello.
First, here is a motivating example:
public class Algorithm
{
public static void compute(Data data)
{
List<Task> tasks = new LinkedList<Task>();
Client client = new Client();
int totalTasks = 10;
for(int i = 0; i < totalTasks; i++)
tasks.add(new Task(data));
client.submit(tasks);
}
}...
Hi all,
I am in the process of writing a rule engine that performs simple assignments as determined by conditional constructs. It is a prerequisite of the project that the rules be in XML format. I have modeled my XML schema to resemble simple code blocks. I wish to parse the XML and to then transform it into Java code. I then wish to c...
I have the following in a java file (MyRtmpClient.java):
import org.apache.mina.common.ByteBuffer;
and ByteBuffer is inside a JAR file (with the proper directory structure of course).
That jar file and others I need are in the same directory as the .java file.
Then I compile with the line:
javac -cp ".;*.jar" MyRtmpClient.java
But...
How can I get output from Java anonymous classes? In .Net I would use closures.
executor = Executors.newSingleThreadExecutor();
final Runnable runnable = new Runnable() {
public Exception exception;
@Override
public void run() {
try {
doSomething();
}
catch (Exception exception) {
// I'd like to report thi...
Does anybody know a Java tool that can convert a pdf file to a swf file ?
To clarify, we are building a site to generate photo albums. The photo album editor is written in Flash (ActionScript 3.0) and then on the back-end is written in Java and it generates a pdf for the album. The problem is having two rendering engines (Flash for clie...