35,618 Topics

Member Avatar for
Member Avatar for ShahzebN

Hey I'm supposed to make a program using the HSA application console I'm using Ready to Program 1.7.1 The program I'm supposed to make could be any kind of game/activity Some examples are connect4, poker, reactionTimeMeasurement, other card games I've seen source codes for these programs online, but I must …

0
22
Member Avatar for ceyesuma

Hello There is no error and no table. Could someone find the missing code needed to render the table? How do I Verify that outocommit is OFF? output: [code] in personalDataTable: Supports Scroll headers: ADMIN_UID headers: ADMIN_PASSWORD headers: ADMIN_LNAME headers: ADMIN_MNAME headers: ADMIN_FNAME headers: ADMIN_GENDER headers: ADMIN_AGE headers: ADMIN_START_DATE headers: …

Member Avatar for ceyesuma
0
115
Member Avatar for Serrafine

I've looked over the forums but I can't find anything to help me. I've tried out some of the code but I still end up with a blank image. What I'm trying to do is allow the user to draw an image in a JPanel and then I want to …

Member Avatar for Ezzaral
0
2K
Member Avatar for ceyesuma

Hello I am using : [icode] conn = ddf.getConnection(); setConn(conn); ps = (PreparedStatement) conn.prepareStatement( ModelUtils.getXMLResource("selectAdmin"),ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); ps.setString(1, thisUser); rs = ps.executeQuery(); [/icode] and [icode] public int getRowCount() { try { rs.last(); return rs.getRow(); } catch (SQLException ex) { Logger.getLogger(AdminPanel.class.getName()).log(Level.SEVERE, null, ex); ex.printStackTrace(); return 0; } } [/icode] and it is …

Member Avatar for ceyesuma
0
260
Member Avatar for vani.golakoti

How to establish the connection between two hosts using TCP socket programming in java.

Member Avatar for jwenting
0
65
Member Avatar for DanJack90210

Hey everyone, I am writing a Java program and I want to present the user with a settings window when they run a function in the main GUI so they can set the parameters which are used in the function. Ideally what I would like to do in the main …

Member Avatar for DanJack90210
0
216
Member Avatar for bmb11

Hello, I am trying to build a gui with two textfields, a textarea, and a few buttons. The two textfields are for the user to enter in random numbers (one number in each textfield). I then want the person to be able to hit a button that will then take …

Member Avatar for bmb11
0
189
Member Avatar for smart99

Hi all i am new in j2ee but have good experince in asp.net what is the best book or web to start java [U][/U]

Member Avatar for NP-complete
0
72
Member Avatar for xzero_x

[CODE]import java.util.Date; class House implements Cloneable,Comparable { private int id; private double area; private Date Whenbuilt; public House(int id,double area) { this.id=id; this.area=area; Whenbuilt=new Date(); } public String toString() { return id+" "+area+" "+Whenbuilt; } public int compareTo(Object o) { if(area>((House)o).area) return 1; else if(area<((House)o).area) return -1; return 0; } …

Member Avatar for NP-complete
0
88
Member Avatar for mozten

Need help with my chat program as it is not working. Right now, its supposed to be like a server-client "chatroom". But I have a problem with sending a message that one client sends to the server, to everyone. Here is what I have so far, can anyone point out …

0
66
Member Avatar for scream2ice

I'm trying to convert a String that I've read from the first line of a text file to integer this is how: String="8 12 10" and this is what I'd like to have: int x=8 int y=12 int z=10 parseInt doesn't work because it gives me some other number (perhaps …

Member Avatar for Abdel_eid
0
240
Member Avatar for Ajantis

Hello :) Suppose I input an int value with Scanner sc = new Scanner(System.in)... and I want to count how many divisors that value has, how would I proceed in "recognizing" a divisor? if ((input/2)%10 == 0)? I'd prefer doing this recursively somehow. Can someone help? :) Best Wishes!

Member Avatar for Ajantis
0
82
Member Avatar for karindra
0
28
Member Avatar for electricrain

i have been asked to make phone book console application in java using collections/data structure i have done some of it. i am having problem that i have to store firstname,lastname,cellnumber,emailaddress etc in such a way into collection so that if some one wants to search phone number from phonebook …

Member Avatar for JamesCherrill
0
631
Member Avatar for Clawsy

Hi, I have a few simple questions regarding sending SMS from my PC to my moble phone. I have two libraries which should be able to send SMS messages: [CODE] import com.simplewire.sms.*; public class send_text { public static void main(String[] args) throws Exception { SMS sms = new SMS(); // …

Member Avatar for jwenting
0
986
Member Avatar for ceyesuma

Is it possible to write a class and hava a another class add that to a panel?

Member Avatar for ceyesuma
0
87
Member Avatar for madhurita

Java program to find the longest substring which are common in 3 strings. Please help me out. Madhurita

Member Avatar for finito
0
96
Member Avatar for idlackage

Probably a stupid question, but I need the 'colour' variable for an external class, and it can only return something when it's declared in the constructor. However, the colour returned would then never change. Is there a way to return values from the change listener, or anything else that I …

Member Avatar for JamesCherrill
0
526
Member Avatar for tarek.mostafa

Dear all, I developed a web application and it is working fine, except for one issue. The application includes uploading files from a JSP to my servlet, and the issue is that i would like to have a limit for the uploaded files on the client side (before actually uploading …

Member Avatar for jwenting
0
87
Member Avatar for jiraiya

Hi all, I'm working on a project in Java that involves developing a GUI that can, among other things, receive user input from the keyboard, receive and store handwritten input (characters/words) done with a mouse, and display png images. Eventually the program will be used on a linux environment, but …

Member Avatar for jwenting
0
91
Member Avatar for sam1

hi does any1 knw how to put the path for servlets in netbeans. it is located in src/java/controll/servlet i have this in my code action = "servlet/controll.servlet" but it says directory not found thanx ps I posted it here because nobody is answering it in jsp section!! :rolleyes:

Member Avatar for mxd4n13l0n
0
204
Member Avatar for socal

[CODE]import java.util.Scanner; public class bankAccount { //instance variables public String name; public int number; public double balance; public double deposit; //constructor public bankAccount(String name, int number, double balance, double deposit) { this.name = name; this.number = number; this.balance = balance; this.deposit = deposit; } public double getBalance() { return balance; …

Member Avatar for NP-complete
0
121
Member Avatar for Fazle

My above code is reading TCP data and writing them in minute file under recording directory as follows: /WSIGraphicRecord3/recordings_dir /WSIGraphicRecord3/recordings_dir/20100512133155.ws /WSIGraphicRecord3/recordings_dir/20100512133256.ws /WSIGraphicRecord3/recordings_dir/20100512133357.ws /WSIGraphicRecord3/recordings_dir/20100512133457.ws /WSIGraphicRecord3/recordings_dir/20100512133557.ws /WSIGraphicRecord3/recordings_dir/20100512133658.ws /WSIGraphicRecord3/recordings_dir/20100512133800.ws /WSIGraphicRecord3/recordings_dir/20100512133900.ws /WSIGraphicRecord3/recordings_dir/20100512134001.ws /WSIGraphicRecord3/recordings_dir/20100512134101.ws /WSIGraphicRecord3/recordings_dir/20100512134202.ws /WSIGraphicRecord3/recordings_dir/20100512134302.ws /WSIGraphicRecord3/recordings_dir/20100512134403.ws /WSIGraphicRecord3/recordings_dir/20100512134503.ws /WSIGraphicRecord3/recordings_dir/20100512134603.ws Now my question is how to playback these files with same speed? I am able to …

0
54
Member Avatar for jaysean

Hello forum, I am stuck with a field comparison problem for two files. In one file I have first names and other pet names. Now I am trying to get results where first names are within a 20 word range of pet names(+-20 for checking on each side of word …

Member Avatar for jaysean
0
149
Member Avatar for mayank.15

I had this basic question. Suppose I have a directory on my computer C:\Abc\New. Now I can access this directory using : File file = new File("C:\\Abc\\New"); Now I can open all the files inside this directory using : File[] files = file.listFiles(); And I can process the files individually …

Member Avatar for mayank.15
0
322
Member Avatar for tarek.mostafa

Dear all, I developed a web application and it is working fine, except for one issue. The application includes uploading files from a JSP to my servlet, and the issue is that i would like to have a limit for the uploaded files on the client side (before actually uploading …

0
62
Member Avatar for AmericanRogue

Hi there, I am a High School CS student and I'm making a simple version of Deal or No Deal for my final project. I'm an trying to figure out how to find the money value in the player-chosen case and mark that cash value off of the fakeBoard. I …

Member Avatar for jwenting
0
2K
Member Avatar for rhiby

Am to develop an application (MIDP) running on mobile phone which can connect to database through a servlet and returns exams available in MYSQL database and stores it in a RecordStore and finally lets the user to pass an exam and view results after finishing exam. So please help me …

Member Avatar for peter_budo
0
71
Member Avatar for johndoe444

The following example is taken from GWT tutorial ([url]http://code.google.com/webtoolkit/doc/latest/tutorial/codeclient.html):[/url] [CODE]private void addStock() { final String symbol = newSymbolTextBox.getText().toUpperCase().trim(); newSymbolTextBox.setFocus(true); if (!symbol.matches("^[0-9A-Z\\.]{1,10}$")) { Window.alert("'" + symbol + "' is not a valid symbol."); newSymbolTextBox.selectAll(); return; } if (stocks.contains(symbol)) { newSymbolTextBox.selectAll(); return; } int row = stocksFlexTable.getRowCount(); stocks.add(symbol); stocksFlexTable.setText(row, 0, symbol); Button …

Member Avatar for JamesCherrill
0
101
Member Avatar for Caled

Hi, Im having a problem displaying text in JTextPane. I want to be able to append text (e.g. "Task 1 completed..") after a task is completed. But mine display the text once all the tasks are completed which is quite useless as user does not know what is going on. …

Member Avatar for Alex_
0
83

The End.