I have virtual server in EC2 Amazon. Currently I'm using pgadmin to connect to postgres db in my server.

Problem : Whenever I execute any queries (e.g DELETE), it will go on endlessly. But If you SSH into the server and check the result, the DELETE query has been successfully executed.

Please advice. Thanks.


In linux, ANT, JAVA, GIT and etc functions are integrated to it's terminal upon installation. You can straight type "ant dep" then press [I]tab key[/I] to get "ant deploy.".

How do I do / get the similar functionality in windows 7. Please advice.

As I said I'm new to java, and I don't think it swing is a problem, I'm learning..... anyway thanks for your advise.

import java.awt.EventQueue;

import javax.swing.JFrame;

public class tatat extends JFrame {

private static final long serialVersionUID = 1L;

public static void main(String args[]) {
    EventQueue.invokeLater(new Runnable() {
        public void run() {
            try {
                tatat frame = new tatat();
            } catch (Exception e) {

public tatat() {
    setBounds(100, 100, 500, 375);



I'm new to java. I'm confused on how to bring "public tatat ()" into the main method above without writing a separate statement as shown above? Please advise. Thanks.

solved! thx all

Actually this is not .jar files. It is java source files.

Hi there,

I'm unable to run the demos java files. I followed the ways according to the prefuse tutorial. It says,

1) Go to "build" folder
2) Launch demo of interest
java -cp prefuse.jar:demos.jar prefuse.demos.<name of demo here>

and I inputted
e.g. java -cp prefuse.jar:demos.jar prefuse.demos.TreeMap.java

Please advice.

[COLOR="Red"]*Screenshot Attached![/COLOR]

Thanks stephen84s.

I've read it there, still not sure, that's why I posted here.

  1. Which one is more user friendly
  2. Which is best suited for both beginner and advance user

[B]Eclipse IDE for Java Developers[/B] (85 MB) [B][COLOR="Red"]Vs[/COLOR][/B] [B]Eclipse Classic 3.4.1[/B] (151 MB)

Just wanted to know. Please advise.

I know, but it did not work.

I tried, not working. Please advise.


  • IconDisplayer.java is a 1.4 application that requires the following files:
  • images/rocketship.gif

import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Rectangle;

import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;


  • This component displays a single icon one or more times in a row. The images
  • are right-aligned, with 5 pixels padding in between. All but the rightmost
  • image are mostly transparent.

public class IconDisplayer extends JComponent {
private Icon icon;

private int preferredNumImages = 2;

private int pad = 5; //space between images

private Rectangle iconRect = new Rectangle();

private Rectangle clipRect = new Rectangle();

public IconDisplayer(Icon icon, int preferredNumImages, int pad) {
this.icon = icon;
if (preferredNumImages > 0) {
this.preferredNumImages = preferredNumImages;
if (pad >= 0) {
this.pad = pad;

//Set a reasonable default border.
if (this.pad > 0) {
  setBorder(BorderFactory.createEmptyBorder(this.pad, this.pad,
      this.pad, this.pad));


public Dimension getPreferredSize() {
if (icon != null) {
Insets insets = getInsets();
return new Dimension(icon.getIconWidth() * preferredNumImages + pad

  • (preferredNumImages - 1) + insets.left + insets.right,
    icon.getIconHeight() + insets.top + insets.bottom);
    } else {
    return new Dimension(100, 100);

    public Dimension getMinimumSize() {
    if (icon != null) {
    Insets insets = getInsets();

    //Return enough space for one icon.
    return new Dimension(icon.getIconWidth() + insets.left

  • insets.right, icon.getIconHeight() + insets.top
  • insets.bottom);
    } else {
    return new Dimension(0, 0);

    protected void paintComponent(Graphics g) {
    if (isOpaque()) { //paint background
    g.fillRect(0, 0, ...

Thanks, will try it n update it here.

import javax.swing.;
import java.awt.

public class CreateToolbar{
public static void main(String[] args) {
JFrame frame = new JFrame("Create a toolbar Which have three buttons Such as: Cut, Copy, Paste");
JToolBar toolbar = new JToolBar("Toolbar", JToolBar.HORIZONTAL);
JButton cutbutton = new JButton(new ImageIcon("cut.gif"));
JButton copybutton = new JButton(new ImageIcon("copy.gif"));
JButton pastebutton = new JButton(new ImageIcon("paste.gif"));


After I execute the above code, there was no build problem. When I run it, everything fine except, the icons was not displayed. Please advice. Thanks.

Thanks for all your advises.

Yes, I'm currently working on Pseudo-Code. Trying to optimize the Pseudo-codes.

[COLOR="Green"]Netbeans IDE[/COLOR]
[COLOR="Green"]Eclipse IDE[/COLOR]
[COLOR="Green"]IntelliJ IDEA[/COLOR]

Which from the above the the [COLOR="Red"]BEST[/COLOR], [COLOR="Red"]USER FRIENDLY[/COLOR], [COLOR="Red"]COMPLETE[/COLOR] IDE to use to design/create GUI for Java based programs. Please advise. Thanks.

I understood the Algorithm, just I don't really know how to apply it in Java. I never used Java before as all these while I'm with PHP. Thanks for your advise.

I doing a project about Genetic Algorithm (GA). I'm looking for some book that shows GA in Java. Please advise.

[COLOR="Red"]White Papers/ Publications[/COLOR]

Thanks for the suggestion, will give a try

package midp.firstAid;

import javax.microedition.lcdui.*;

public class AboutCopy extends Basic {

public AboutCopy() 
    super("About Product");
    append("Copyright 2008\n " +
           "\n Nanthikesvaran\n" +
           "\n" +
           "This product based on Java Technology " +
           "to give and provide sufficient information " +
           "of a knowledge on First Aid.\n"+
           "It's still under development as it's only a " +
           "prototype of an application"



C:\Documents and Settings\Lord Executioner\Desktop\firstAid\AboutCopy.java:3: package javax.microedition.lcdui does not exist
import javax.microedition.lcdui.*;
C:\Documents and Settings\Lord Executioner\Desktop\firstAid\AboutCopy.java:5: cannot find symbol
symbol: class Basic
public class AboutCopy extends Basic {
C:\Documents and Settings\Lord Executioner\Desktop\firstAid\AboutCopy.java:10: cannot find symbol
symbol : method append(java.lang.String)
location: class midp.firstAid.AboutCopy
append("Copyright 2008\n " +
3 errors

Process completed.

[COLOR="Green"]Please Advise.[/COLOR]

Thanks for the advise, solved.

var cBrand = document.getElementById('cBrand');
var cType = document.getElementById('cType');
var cStyle = document.getElementById('cStyle');
var cFrame = document.getElementById('cFrame');
var cGroupSet = document.getElementById('cGroupSet');

if (empty(cBrand) && empty(cType) && empty(cStyle) && empty(cFrame) && empty(cGroupSet))
    alert("Please Choose atleast 2 Criteria");
    return false;
       return true;


The above code is not working --------- Please advise. thx

Thanks for your advise, will follow and update here soon.


    How to this type of validation using JavaScript?

In my SEARCH page, user was given 5 types of field[COLOR="Red"](drop-down menu)[/COLOR] to choose from. User can select either 1, 2,3,4 or all the field's option to make a search. I know how to do validation field by field[COLOR="Red"](need to fill in the previous field before use can proceed to the next field)[/COLOR], but I don't know how to write a JSript to alert " None of the field chosen! " and if at least ONE of the field is chosen, then the user can submit his/her search. Please advise.

can u help me to solve isFloat, pls.

<script type="text/javascript">
function validateFloat()
var o = document.frmInput.txtInput;
switch (isFloat(o.value))
case true:
alert(o.value + " is an float")
case false:
alert(o.value + " is not an float")

<form name="frmInput">
Enter something: <input name="txtInput" size="4">
<input type="button" value="Validate" onclick="validateFloat()"></input>

Not working. pls help

no problem with the upper, managed to solve myself. Thank you very much for your reply.

managed to solve myself. Thank you very much for your reply.