I want to know whether it is possible to listen to the mouse event of dragging in JFreeCharts. By default it is assign to zooming. I remove this zooming functionality with,
chartPanel.setDomainZoomable( false);
chartPanel.setRangeZoomable( false);
And I have used ChartMouseListener interface for listening to mouse events. I'm able to ...
I'm trying to make a orb of light (Like a sun) but I can't seem to make it visible at all. I'll give you some snipets of code I have. It's in Java LWJGL, so it might look a little different.
private float lightAmbient[] = { 0.0f, 1.0f, 1.0f, 1.0f }; // Ambient Light Values ( NEW )
private float lightDiffuse[] = { 1.0f, 1.0f, 1.0f, ...
As far as I know, the only way to parse Java source-code into an AST (Abstract Syntax Tree) is to use the Java Compiler Tree API: com.sun.source.tree
I have two questions:
What JDKs support com.sun.source.tree?
Is there a portable replacement that works for all JDKs?
...
I'm having a bit of a hard time. Essentially I need a data structure that would work a bit like a database. I need to be able to have multiple bits of data for each key and have the possibility of having multiple keys with the same name. Then I need to be able to search that data structure and pull the correct keyword and check it agains...
I've got my own implementation of this wrapped up in a function that takes a URL argument but I can't help thinking there must be a nice function that does this already within the Android API.
Does such a function exist?
EDIT: Oops. I would just like the text - not the HTML.
...
## This is the code i m runnig in linux ubuntu.. ##
import java.sql.*;
/**
*
* @author spk
*/
public class Connectionsetting {
private static Connection con;
private static java.sql.Statement sm;
private static ResultSet rs;
public void close()
{
try
{
sm.close();
con.clo...
I am trying to get an RMI activatable server to work - but no luck so far. Actually the server seems to run, but the client triggers a strange exception.
I have 3 projects:
client
common
server
Common is shared code between client and server (such as remote interfaces).
Steps I follow (been adapting this tutorial):
start registr...
public class MyGraph<V,E> extends SparseMultigraph<V,E>{
private ArrayList<MyNode> myNodeList;
public MyNode getNode(int nodeId){
myNodeList = new ArrayList<MyNode>();
myNodeList = (ArrayList<MyNode>)this.getVertices();
int i;
The following are the error msg:
Exception in thread "main" java.lang.ClassC...
I'm writing a code that generates a large XML document and writes it directly into a client stream using StAX XmlStreamWriter.
I'm afraid that if the network becomes extremely slow, the bytes written into the stream will actually stay in memory buffers for a relatively long time and consume a lot of memory on my server.
My question is: ...
How can I connect to remote MySQL database through SSH from java application. I'd appreciate a small code example.
...
Hi All,
I have form with two buttons having same name but different values ,how to get the value of both the buttons having same name but different value using request ?
<form action="controller">
<input class="smallbutton" name="op" value="login" type="submit"/>
<input class="smallbutton" name="op" value="SignUp" type="submi...
I've written a java program that writes another java project. However, I want to add a piece of specific code that will import the project into the workspace. Can this be done?
...
I am using a custom subclass of JPanel to offer me more control over the display of some images. The code to it is below.
However, in Netbeans, in design mode, I would like to be able to see the image that I am working with, instead of simply looking at the outline of the object.
There is an image attribute, but the only way I can cur...
I've been trying to learn about Neural Networks for a while now, and I can understand some basic tutorials online. Now i want to develop online handwritten recognition using Neural Network. So i haven't any idea where to start? And i need a very good instruction. In finally i'm java programmer.
What do you suggest I do?
...
In my code, I use mouse coordinates to interact with the program. From there, something must be drawn at the mouse's location. However, the getX()/getY() methods for the Canvas return the values of the window holding the Canvas, but when I go to draw, (0,0) is located slightly to the right and below (past the bars) the top left of the wi...
I have heard of this algorithm, but is this algorithm good to use it with Bayesian Belief networks? Hugin is based on it and I'm looking for a book / article on this algorithm.
...
I'm creating a splash screen for a Java application using the SplashScreen class. The problem is that the position on multi-monitor systems is undefined. The documentation states "the position on multi-monitor systems is not specified - it is platform and implementation dependent". The application is going to be used solely on multi-moni...
Hi there,
I'm trying ton include some JSF into my webapp. For the components lib I've choosed ICEFaces, now I'm facing a problem:
ICEFaces doesn't trigger the processAction method which is required to get requestparameters. In my other "normal" portlets I can do - in JBoss Portal - e.g.
/portal/dashboard/hellpPortlet_Window?action=1&...
I am wondering about the the following piece of Java code:
"System.out.println". I am right about this:
"System" is a static class. ".out" is a method of class "System". This is the bit I am slighty confused about ".println"-- what class / object is this a method of?
Also, is this concept known as "method chaining"?
Thanks
GF
...
I set up a working maven project with mvn archetype:create ...
I can compile all the sources with mvn compile but I want to be able to compile also a single file at time.
There is a way to ask maven to compile an arbitrary single .java file?
Thanks
Updates 1:
I would specify the single file on the command line. I would choose the fil...