Rendering question

993 byte By Kohinoor24 at 2007-11-20 7:42:30
I have rendered a column of my table with a combobox.Some questions surfaced when I worked deep in to it.I have rendered the cell which would look like a combobox only on editing as follows.sheetColumn.setCellEditor(new DefaultCellEditor(comboBox));//sheetColumn is my column name.Have a function in...

mobile app - listen for number button presses

517 byte By ggmn at 2007-11-20 7:42:34
These forums saved my skin many a time a couple of years back when I was getting to grips with C++/MFC, and now I hope the same can be said as I get started with Java...I'm using Netbeans + mobility pack to write a mobile phone app, and need to listen for different button presses while the app...

Listing IP Address

273 byte By J-Fire_Man at 2007-11-20 7:42:48
How can I list the IP Address of all computers that are connected altogether within a network? I don't want to use manual IP Address input for connecting with a computer, so since windows have the list of all connected computer, I wonder if I can get their IP address.

HELP with Java sound pleez......

983 byte By jacketyjack at 2007-11-20 7:42:49
Hi.I'm a doing a project in Java to do with sound and stuff. I have a question relating to the PCM sound format and not so much on Java but I thought this forum was the closest to do what I was doing(??).Question:I basically know everything about the PCM format. Kindly, however, inform me: What...

placing buttons with loop

3451 byte By Trainwreck at 2007-11-20 7:42:57
Hello, i want t ocreate a few buttons on a dialog. But i want to do this in a for loop. But i dont know how to accomplish this.I have the following code. public static void main(String[] args) { //Set values for button place. int buttonX = 20; int buttonY = 20;...

how to read Mpeg File

163 byte By roger5089 at 2007-11-20 7:43:12
Dear all <br/>in java program , which method i can use to read mpeg file?<br/>i knew i can use stream to poss avi file but , does mpeg file i can use stream as too

Help with arrays.

1269 byte By apl1ne at 2007-11-20 7:43:18
Hi, I am new to the forums and coding with java. For a project, I need to have following:Student class 3 instance variables firstName, lastName, gpaa constructor which takes 3 parameters and sets the instance variables equal to themat least one method- getGPA - to return the students gpa for use b...

How to get AUTO_RESIZE_LAST_COLUMN to work properly?

6432 byte By Martin O at 2007-11-20 7:45:05
How can I prevent a JTable set to AUTO_RESIZE_LAST_COLUMN from automatically sizing columns other than the last column? I would have expected that it would work this way, but it seems that AUTO_RESIZE_LAST_COLUMN only applies to behavior of manually changing header widths (by dragging header margin)...

extending a class

420 byte By lontana at 2007-11-20 7:46:15
Dear All,I have a class A that extends a class B. Now I want to implement methods of the class A on the object of the class B.I tried first to create an object of the class A and then to assign to him the object of the class B typecasted in class A, but I got typecast exception.I tried directly to i...

Help me! SQL Driver for JDBC

952 byte By ttnhatan at 2007-11-20 7:46:19
I wrote code:import java.sql.*;public class SqlTest { private Connection con; public SqlTest(){ this.loadDriver(); this.getConnect(); } public void loadDriver(){ try{ Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); }catch(Exception ce){ System.out.println("Can not load drive...

Table rows not getting displayed

2635 byte By Kohinoor24 at 2007-11-20 7:47:06
Hi Guys,In the following piece of code,Iam creating a table ,having 2 rows.The problem for me is that apart from the header row,the other 2 rows are not getting displayed.When debugged the rowcount vector shows zero.Also when I tried to add the table to the panel without putting it into a scrollpane...

Go Board

989 byte By Havoc- at 2007-11-20 7:47:22
My final project in AP CS is creating a game of some sort, I happened to pick Go, not really knowing just how much work I'd have to do to create it. We haven't worked with JavaScript at all and I was wondering if anyone can point me in the right direction for creating I guess some sort of...

Trouble comparing two doubles

1658 byte By VomitHatSteve at 2007-11-20 7:47:38
I'm working on a school project where I need to create the AI for a computer player in an Asteroids type game. The short version is that the player selects a location on the game map and tries to navigate to that location. To do this it needs to determine if an asteroid is in its way.Here...

[RESOLVED] Get Index on mouseEntered

780 byte By hensa22 at 2007-11-20 7:47:41
hi allI have a quetion. public class test extends JApplet implements MouseListener{ private JToggleButton bt_1[]=new JToggleButton[9]; public void init() { for (int i=0;i<9;i++) { . . . bt_1[i].addMouseListener(this); } } // public void init() public void mouseEntered(...

fill array with random numbers

265 byte By vivendi at 2007-11-20 7:47:56
Hey, i have an array from [0] to [15] which i want to fill with random numbers. But the numbers also have to be from 0 to 15 and i dont want any duplicate numbers in it.<br/>So each item in the array has its own number.<br/>But i have no idea how to do this...

Help!

4578 byte By viper12 at 2007-11-20 7:47:59
I've just started doing Java, and as usual, everything is going over my head at this point of time, can someone please help me with these codes, please?I'll most greatful.A JavaScript program is intended to accept two numbers from a user, then write the sum and difference of the two number...

[RESOLVED] JApplet Error on browser

574 byte By hensa22 at 2007-11-20 7:48:35
hi everyone.I face a problem.I have simplest code to create Applet.Java Code public class michi extends javax.swing.JApplet { public michi() { }} html <APPLET codebase="classes" code="michi/michi.class" width=350 height=200></APPLET> but when I load on browser shown error message at Stat...

help with time and draw

303 byte By bassem_hassen at 2007-11-20 7:48:39
hi all: i hope u r all finenow i make a program that sort using all sort algorithms ...now i ask about ::1. how can i use time in java to compare this methods time 2. to make simple simulation using draw lines or bars"for sort element" thanks for advance & have nice time...

weightx and weighty in Gridbag Layout issues

238 byte By Venkateswaran at 2007-11-20 7:48:48
What are the reasons for a component to exceed its weightx or weighty values? I need to fix a component (which has zero or more sub components) in its exact weightx or weighty values. Tell me the various solutions to meet my requirements.

Load balancing in JBoss Server

375 byte By haifriends at 2007-11-20 7:49:05
Hi Java gurus,Can anyone help me in Clustering in JBoss Server.I have a JBoss Server and my application is running in JBoss Server. I want to run 2 JBoss Server to balance in the load. If one server is failed other one should balance the load and run.What should i do for this? Can anyone help in thi...

Enabling JMX in Tomcat server

248 byte By haifriends at 2007-11-20 7:49:06
Hi,<br/>I have successfully Installed Tomcat 6.0 in my machine. I want to Enable JMX in Tomcat Server.<br/>What configuration is needed to enable JMX in Tomcat server?<br/>I am using MAC OS.<br/>Thanks in Advance,<br/>haifriends

problem with the import of a package

480 byte By lontana at 2007-11-20 7:49:34
Hi,I use NetBeans IDE 4.1. I tried to import a library by clilcking on the project window on the project icon and selecting Properties. In Library menu I added the zip file that contains all necesaary java classes.By writing import command in the source code and after giving name of the packages a w...

servlets

409 byte By vivendi at 2007-11-20 7:50:03
Hey guys, i want to make a basic website with servlets just for practise, but i dont know how to get started.Im using netbeans 5.5, which has tomcat build in. But i dont know how to setup a project for (web) servlets. And how to begin programming for servlets.So does someone here have a tutorial for...

Using ActiveX & Com dll

57 byte By leeshadmi at 2007-11-20 7:50:17
Can i do that in Java<br/>I really new to Java<br/>Thanks

Need any tools or plugins

144 byte By sammoh at 2007-11-20 7:50:41
Hi<br/>is there any Tools or plugins like PMD, Findbugs, Cheackstyle etc.. to find out "NullPointerException"??<br/>Thanks<br/>Sammoh

Cannot run jar file in PHP file

1024 byte By dummyagain at 2007-11-20 7:50:52
I have made a simple applet using netbean.. just create an applet with a button and build the project. I copied the jar file in my web server and called it by echo "<APPLET archive=\"PhotoGallery.jar\">"; echo "<PARAM NAME=TEXT VALUE=\"Hi There\">"; echo "</APPLET>";However, it sti...

BufferedOutputStream do not write all byte array in linked OutputStream

788 byte By dani_b_angelov at 2007-11-20 7:50:54
Hello,I am writing a proxy.When a proxy works like transparent"clientOut.write(response, 0, responseLength);"clientOut is "BufferedOutputStream clientOut = new BufferedOutputStream(pSocket.getOutputStream());"All is works right,but when I change response array"responseProxy = modi_content(response,w...

Set size of scroll button in JTabbedPane with SCROLL_TAB_LAYOUT policy

656 byte By shimsha_r at 2007-11-20 7:51:35
Hello,I am using JTabbedPane and its has tab layout policy of SCROLL_TAB_LAYOUT. I want to increase the size of the scroll buttons. How I can do that? I tried to set the size inside tabbepane's ui using the following function:protected JButton createScrollButton(int direction){ JButton button =...

calling a class in java

385 byte By skylimit at 2007-11-20 7:51:36
Hi, anyone know how to call a class in java pls? many thanks in advancee.gpseudo code:class1 {//statementsclass2 //call to calss 2main(){}}class2{//statements..}Q: How can I call class2 within class1 pls help!fresher is online now Report Post Edit/Delete Message...

Java quarterly calculations

269 byte By sbranch at 2007-11-20 7:52:05
What algorithm would you use to compute quartely totals.<br/>Quarters(1Oct - 31 Dec. ;1 Jan - 31Mar; 1 Apr - 30 Jun.)<br/>For example: compute the days idle in the first quarter(1Oct - 31Dec.)<br/>The user will only enter month and year.<br/>Thanks.

Drag And Drop Image Uploader

433 byte By dummyagain at 2007-11-20 7:52:21
I would like to make a image uploader that allows the user to drag and drop the images. When the user drag the images to the uploader to upload, it will upload the file to server and show the thumbnails of the images.What kind of component(e.g. JEditorPane) shall i use for dragging the images into i...

Complete noob

496 byte By Guydin at 2007-11-20 7:52:28
Edit: I deleted and edited my post to make it short and to the point.I have Sun Java Studio Enterprise 8.1. How do I go from a basic file, such as: class HelloWorldApp { public static void main (String args[]) { System.out.println("Hello World!"); }...

executing through the command line

812 byte By LiorZat at 2007-11-20 7:52:30
Hey Everybody, I've written this project and I'm trying to execute it through the command line using: >java -cp "jar #1.jar;jar #2.jar" package.MainClass I have quite a few jars to add and I didn't know which ones I needed to add so I just called the command and each time I got an...

Increasing HeapMemory in java

865 byte By Raghavendra Prabhu at 2007-11-20 7:52:35
hi,I am reading records from Database using ApacheTomCat5.0 in java Here i am getting error as Exception in thread "main" java.lang.OutOfMemoryError: Java heap spacei am using Sql = " select * from Employee" which has got 20 columns and morethan 1lakh records ArrayList list = new ArrayList(); while...

Array

300 byte By patience at 2007-11-20 7:52:52
After reading about programming I am still confused about array and how it work can someone please Describe how it works and how you could implement an array. <br/>Also can you describe how items in the array might be searched for or sorted. <br/>How are they useful in your everyday work?...

Floating Point Approximation Error

245 byte By asantavicca at 2007-11-20 7:53:02
Has anyone come across this? Any ideas on how to avoid it? I'm trying to work with numbers that are very precise (like 0.230184910384), and keep getting messed up and I think it's because of this approximation.<br/>Any thoughts?

WEB-INF/lib ?

1660 byte By Trainwreck at 2007-11-20 7:53:46
Hello, im trying to learn from a sourcecode written for java in a servlet.Its a netbeans project, so i opened it in netbeans. But i found out that the only thing that im missing is a WEB-INF directory.So i created this dir next to the META-INF directory. I added a web.xml in the WEB-INF dir with the...

Netbean jfilechooser

272 byte By dummyagain at 2007-11-20 7:54:09
I am using netbean 5.5, when i drag the jfilechooser in the GUI panel, it will show a large file chooser panel. However, I would like to know if i can use a button to trigger that file chooser panel.. since the current design occupies too many space...<br/>Thank you.

Error when running jFileChooser

991 byte By dummyagain at 2007-11-20 7:54:11
I have made a button to trigger a file chooser. But when a click on the button, the following error is producedjava.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)Here is my code JFileChooser fc = new JFileChooser(); jLabel1.setText("test");...

HTTP Upload

145 byte By dummyagain at 2007-11-20 7:54:16
I would like to know how to upload file to web server using java japplet?<br/>can i use socket? or anything i shall use?<br/>Thank you.

Web ServerClient, RMI

723 byte By J-Fire_Man at 2007-11-20 7:54:19
I begun to take a next step of server client programming. I have learned how to create server client applications in local network.I have a chatting application made using the common local network server client architecture. Now I want to do so via the web, kinda like yahoo messenger. So even tough...

missing return statement error?

1430 byte By miniboy1962 at 2007-11-20 7:54:38
Hey Guys, New Here and need help. I keep getting a "missing return statement" but everything seems to be in order. I'm using Crimson Editor and all the brackets line up. Don't know what i've done wrong. Anyone have any ideas? This is the code. I'm just starting out so dont be c...

How to retrieve a node using xpath in java

280 byte By anubhav.anand at 2007-11-20 7:54:51
Hi,<br/>I need to make an application in which on click of a button an xml is<br/>displayed on the browser.<br/>Now when a user selects a node in the xml then i need the xpath of the selected node for some processing.<br/>How to retrieve the xpath.<br/>I am using Struts framework

Copying one row from one JTable to another

5559 byte By shadowdancer at 2007-11-20 7:55:22
Hi all,This is my solution to my problem, he :)With this code, I can easily move one row from one JTable to another:import java.sql.Connection;import java.sql.DriverManager;import java.sql.SQLException;import java.sql.Statement;import javax.swing.JTable;import javax.swing.table.DefaultTableModel;/*...

communication: java with servlet

610 byte By vivendi at 2007-11-20 7:55:37
Hello, when i have a program written in jav. Is it possible to let this program 'communicate' with a servlet?I was thinking about letting the servlet check for certain 'GET' data and perform actions on these.So when i press on a button on my java program, can it talk to a servlet...

Install Jakarta httpclient

214 byte By dummyagain at 2007-11-20 7:55:55
I would like to make use of httpclient to make the file upload function. However, after i download the httpclient package, i would like to know how to install it as i only see a .jar file there.<br/>Thank you.

JApplet Component to show Thumbnail

108 byte By dummyagain at 2007-11-20 7:55:59
I would like to know if there are any swing component for showing a list of thumbnails ?<br/>Thank you.

ComPort Server for Flash (via socket)

2968 byte By Bumbles at 2007-11-20 7:56:22
I'm trying to replace some proprietary software that communicates with an external device over a comport. I've sniffed the comport traffic and know what bytes need to be sent out to achieve the various commands I desire and would like to write a program in flash to replace the proprietary...

New to Java and need some help

1412 byte By MaelC3 at 2007-11-20 7:56:45
i just started working on my own site (through verizon) and i just ran across a problem that i can't make heads or tales of.i have been trying to add the new york times headline tracker to my site. they have a utility that generates the code for you and supposedly all you have to do is copy an...

Running a program with javaw & a Windows shortcut

1657 byte By Martin O at 2007-11-20 7:56:53
I'm having problems running a java class with javaw in a Windows shortcut. I'm getting:'Could not find the main class. Program will exit.'I re-read this forum's FAQ. I wanted to tryout what was mentioned here (from the FAQ):Eliminate Prompt and Executable JarsJavaw.exe is in...