java

Minimal API v. Convenience

I am trying to design the interface that will be used internally for my application. Following Google's example, I strive to reduce public API clutter. However, there are some convenience methods that are defined in terms of the minimal methods. What factors should I consider as I seek a balance between convenience and tidiness? Google ...

Paint background of JPanel

Hi everyone, How can I tell the paint method to draw background on JPanel only and not on the entire JFrame. My JFrame size is bigger than the JPanel. When I try to paint a grid background for the JPanel, the grid seems to be painted all over the JFrame instead of just the JPanel. Here parts of the code: public class Drawing extends ...

Differene between tomcat and resin?

Hi, I like to know what are the differences between Tomcat container and Resin container ...

Can I batch some Swing component updates so that repaints are all done at once?

I have a bunch of buttons in my JToolBar, and I set some of them to be disabled or enabled depending on the state of my application. I find when I am updating a number of buttons at once that they are not all repainted at the same time. I want to ensure that when I set a number of buttons to be disabled/enabled, that they all change st...

Named Parameter idiom in Java

How to implement Named Parameter idiom in Java? (especially for constructors) I am looking for an Objective-C like syntax and not like the one used in JavaBeans. A small code example would be fine. Thanks. ...

Java hosting under $6 per month

Hi, I am a student I like to know about java hosting "anything under $6 per month" should have good customer support and support only tomcat full application server is optional. I have already gone through the following link about java hosting but I am not affordable $9/month. http://stackoverflow.com/questions/113130/where-can-i-fi...

How do I debug a remote application in my eclipse

I am running my server from outside of my eclipse and now i want to debug it. so is it possible ? If yes how can i do that. ...

How to setup java web architecture on hosting slice/dedicated server ?

Hello all I want to build web application that is based on java technology (tomcat ) Can I get please suggestions on how to set up the servers (apache – mod_jk – tomcat ? ) And what are the right frameworks to use or not . For memory and ease of work from the development side ( to use plain jsp or mvc frame works? ) ...

Suggestion for annotation only ORM framework (Java)

I'm working on a medium-sized project in Java (GWT to be precise), and I'm still in the process of deciding what ORM to use. I just refuse to write SQL queries unless utterly and completely necessary (not the case :D) I want to use ONLY annotations, no XML configuring [except database location, username, etc], and I DON'T want to create...

is it possible to overload a final method

In java we cannot override a final method but is it possible to overload ? ...

is possible to overload a main method?

is possible to overload a main method? If yes from which method the jvm will start executing? ...

Java definitions: Label, Token

I wrote this: (fitness>g.fitness) ? return 1 : return -1; and received the following error: Syntax error on tokens, label expected instead. Can anyone explain what tokens and labels are in this context? Edit: Thanks for fixing my code, but could you explain anyway what tokens and labels are, for future reference? ...

How to display flowcharts dynamically in java?

I want to develop a java desktop application that takes some inputs from the user and store it in a database. After that, when user clicks on a button (say display) it displays the information, entered by him earlier, in a flowchart like format. Can I display that information in the form of flowcharts? ...

Is it possible to make an operating system using java?

Hi, I wanna know is it possible to make an operating like windows-xp which is written in C language like can I write that in java so that I will have same features as written in C ...

How do i get a webpage to open up in a frame?

How do i get a webpage to open up in a frame? (i'm using netbeans and java) e.g in a html page you can use <FRAME src="http://www.google.com"&gt; and it will display google in the frame. i don't want it to open a browser, just to open up within the form. thanks ...

The system is out of resources when building Apache FOP

Hi, When I'm trying to build Apache FOP by ant on the command line, it complains: [javac] The system is out of resources. [javac] Consult the following stack trace for details. [javac] java.lang.OutOfMemoryError: Java heap space [javac] at com.sun.tools.javac.zip.ZipFileIndex.readBytes(ZipFileIndex.java:557) [javac] at com...

Question on hadoop "java.lang.RuntimeException: java.lang.ClassNotFoundException: "

Here's my source code import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoo...

help with ant file - classpath for Java task

I have the below build file for Ant and trying to use the target 'run' for executing the program. <property name="springjar" location="E:/Tools/spring-30/dist/" /> <property name="logjar" location="E:/Tools/commons-logging-1.1.1/" /> <patternset id="jar.files"><include name="**/*.jar"/></patternset> <path id="springlearn.classpa...

How to catch a specific exceptions in JDBC?

How to catch a specific exceptions in JDBC? Examples: primary key exception or foreign key exception. ...

Where can I find the tag library definition and source code for Sun's jsp tag?

In particular I want to view the Java source code implementation for <jsp:forward>, but clicking on the tag does not bring me to a TLD, but instead to an XSD. ...