32,204 Topics

Member Avatar for
Member Avatar for Kusno

Dear all, This is me again, with another question...... I have SQL query like this : SELECT CountryName, CountryID FROM MasterCountry Order By CountryName I want to set all country names as Item and countryId as Value to jComboBox. If I select jComboBox, I want to get the CountryID as …

Member Avatar for javaAddict
0
92
Member Avatar for welbyobeng

I am trying to create a java password code where the password is at least 6 characters Long, at least 1 UPPERCASE, & at least 1 lowercase & at least 1 Digit.Here is an example: Passw3 Can someone help me because it is not working. Here is the code private …

Member Avatar for javaAddict
0
103
Member Avatar for Samudricka

i am trying to remova last tokenised string as i am mentioning in below sample....i have stored a data in a hashtable like this.....[ICODE]Hashtable h = new Hashtable(); h.put("111", "A/B/C/d"); h.put("222", "A/B/C/D/e"); h.put("333", "A/B/C/f"); h.put("444", "A/B/C/D/E/g"); h.put("555", "A/B/R");[/ICODE] in order to tokenise these strings and to remove last elements.......for example....here …

Member Avatar for Samudricka
0
89
Member Avatar for ramjeev
0
58
Member Avatar for ramjeev

Hi, I m trying to get the current path using the following.Its works fine (gets the current working directory) in Windows both in debug & release mode.Whereas, in LINUX ,works only in debug mode but not in release mode. i.e.,It gets home path(/root) instead current path(/root/ABC/..) while running in release(by …

0
68
Member Avatar for Kusno

Dear all, I'm sorry to ask you again. This code is my jTable that I copy from my Netbeans source code. tblGroupAnggaran.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null}, {null, null} }, new String [] { "Kode group", "Nama group" } ) { Class[] types = new Class [] { …

Member Avatar for Kusno
0
586
Member Avatar for jorgeflorencio

Good morning, I'm facing dificulties to understand what i'm doing wrong! I'm trying to send the contents of a file... [TEX]SPI01 184-25-03-T-01-R.F.T.1.47e85ab1spicsv, 4609, 2008.03.25, 09:51:45 AM 184-25-03-T-01-R.F.T.1.47e8966dspicsv, 0, 2008.03.25, 14:06:38 PM 184-25-03-T-01-R.F.T.10.47e863easpicsv, 48, 2008.03.25, 10:31:06 AM 184-25-03-T-01-R.F.T.10.47e897f4spicsv, 0, 2008.03.25, 14:13:08 PM[/TEX] into a database "spimon" with a table LogSPI01 with …

Member Avatar for jorgeflorencio
0
116
Member Avatar for Swetham5236

Hi everyone..i'm working on a piece of code.. can anyone tell me what's wrong with the code.. public int move() { Random generator = new Random(); int num = 1+generator.nextInt(9); if(thisBoard.getplayer(num) == Board.NO_ONE){ return num; } } Thanks.

Member Avatar for Ezzaral
0
71
Member Avatar for jimJohnson

Not exactly sure what I am doing wrong...it is probably something simple and just being an idiot today but I have these two errors in my program and not sure what I am doing wrong C:\Documents and Settings\Don & Diane Kruep\My Documents\Judges.java:54: averageScores(double[]) in Judges cannot be applied to (double) …

Member Avatar for Ezzaral
0
539
Member Avatar for it2051229

am making a small program where the user browses an image then the image get's copied into some directory then i want it to be resized if the size is bigger than the required max size. ok how?

Member Avatar for Traicey
0
112
Member Avatar for koke

can anyone help me to get port no of local system .i tried to write a client server prgm in java though the prgm compiled correctly i didnt get o/p as the connection could not be established ther was a connection exception error. expecting your help.

Member Avatar for jwenting
0
30
Member Avatar for lazybugger

Hi all, I`m doing a project on an online bulletin board. I`m not able to configure tomcat in my windows machine. And i`ve been able to compile and run servlets in command line. Its the browser where i want to see the servlets run. Any help will be appreciated. I …

Member Avatar for jwenting
0
101
Member Avatar for Kusno

Dear all, How do I disable all columns cell and select row value to put in textbox using Netbeans ? I have searched using google but not found any significant answer. Thanks and regards, Kusno.

Member Avatar for Ezzaral
0
81
Member Avatar for denniskhor

public void actionPerformed (ActionEvent e) { String hostServer, fromEmail, fromTo, contentSubject, contentMsg; if (e.getSource()== btnSend) { hostServer=txtHost.getText(); fromEmail=txtFrom.getText(); fromTo=txtTo.getText(); contentSubject=txtSub.getText(); contentMsg=msgArea.getText(); // Establish a TCP connection with the mail server. Socket soc = new Socket("" + hostServer, 25); // Create a BufferedReader to read a line at a time. InputStream …

0
56
Member Avatar for eranga262154

Hi all, I use the swing timer to move a dialog from one position to another. Here is the code I have use. [CODE="java"] // Set the main window display location public void setWindowLocation() { int screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height; int screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width; int frameHeight = this.getHeight(); int frameWidth = …

Member Avatar for eranga262154
0
160
Member Avatar for Dio1080

I can't figure out why it is saying (Vehicle.java:174: cannot find symbol) but there is a symbol, what is going on? [code]import java.util.Scanner; public class Vehicle{ protected int hp; protected int mileage; protected int year; public String make; public String model; Vehicle(){ hp = 0; mileage = 0; year = …

Member Avatar for Dio1080
0
157
Member Avatar for karlee

Everything works, except my WritetoDisk, it gives me a NullPointerException PLEASE HELP! /* * database.java * * Created on March 28, 2008 by Karlee * * This program allows the user to add/remove students' first & last name, social security number, debt, and GPA * The user can change te …

Member Avatar for Ezzaral
0
170
Member Avatar for Dr Windows (XP)

Hi guyz, I''ve done a bank's savings account program in java but can't compile, I keep on gettin the errors. 1. overrides `java.lang.Object.toString` 2. This methode must return a result of type String. both of the errors are on the method public `String toString () {...` public class SavingsAccount { …

Member Avatar for Ezzaral
0
86
Member Avatar for it2051229

How do i disable the editing of row in a table? i saw this property "editing row" which by default is "-1".. i changed it to 0 and still doesn't work, I really dont know what "-1" means... how do i disable editing of row? and enabling the sorting too?

Member Avatar for majestic0110
0
92
Member Avatar for debee

Hi there, I have been trying to figure out how I am getting this error: Exception in thread "main" java.lang.NumberFormatException at java.math.BigDecimal.<init>(BigDecimal.java:368) at java.math.BigDecimal.<init>(BigDecimal.java:647) at newtonsMethod1.sigmoidActivationFunction(newtonsMethod1.java:118) at newtonsMethod1.feedForward(newtonsMethod1.java:136) The following code : [code] for(int j =0; j< a; j++) { System.out.println("Enter into input neuron "+ j); String r = in.readLine(); …

Member Avatar for debee
0
283
Member Avatar for 1337455 10534

Hi, I'm a high-school freshman that wont be taking a programming class until next year. I am proficient at Python, and they decided to put me in AB Programming, which is Java. When I first started programming on a z80 TI-83+ with BASIC, I set out to make my life …

Member Avatar for Ezzaral
0
94
Member Avatar for it2051229

Ok I have two frames.. one frame calls the other frame so it's like a dialog box... the second frame pops out, and yeah i want to close this second frame with a button.. how do i do it?? I was also wondering let's just say that I have two …

Member Avatar for Ezzaral
0
292
Member Avatar for a_iyer20

Hello All, I need to create a simple xml document using DOM(I am not specific on using only DOM. It can be SAX also). I tried putting to use a sample from this link: [url]http://www.java2s.com/Code/Java/XML/MakeupandwriteanXMLdocumentusingDOM.htm[/url] In the link above, the line: Document doc = parser.newDocument(); resuts in a null value. …

Member Avatar for jwenting
0
114
Member Avatar for sivaslieko++

Hi, I am developing web page by JSP. I have JAVA classes and I need to implement functions to connect DB2 in JAVA classes. But, I could not connect to DB2.. When I searched I could not find any specific information about "JAVA DB2 connection string". Appreciates any help...

Member Avatar for jwenting
0
137
Member Avatar for Sirjames_da1st
Member Avatar for Sirjames_da1st
0
257
Member Avatar for minamoda

Hi to every one, I need some help about the program i am riting. I am a beginner in java and i cant split my input text file to its tokens. the part of the input file is : [QUOTE]101 Car 06AB1212 100 Y A 3 102 Car 06BG0101 200 …

Member Avatar for Ezzaral
-1
2K
Member Avatar for staneja

i am woring on a project that finds the CPU temprature and shows in the graph. I am using applet to disply this.The CPU temp program is running and fter every minute the Image is modifed but when i m displaying the updated image in the applet it fails to …

0
55
Member Avatar for Kusno

Dear all, I'm newbie in Java language. I get assingment from my teacher to create small project for my final test. Now, I create a Budget Controlling project using Netbeans. I have created main class, Login form, menu and MasterBudgetingGroup (addGroupAnggaran). In menu, I have menuItem. But when I click …

Member Avatar for masijade
0
129
Member Avatar for Kusno

Dear all, Do you know what properties should I set to hide Min & Max button in JFrame. I use Netbeans editor to create login form. Thanks, Kusno.

Member Avatar for Kusno
0
39
Member Avatar for Spartan552

Hi I want to be able to find out the int (or float) value of a variable whoose name is in another string variable [QUOTE]int x = 10; String var = "x"; System.out.println(Integer.valueOf(var).intValue());[/QUOTE] I want 10 to be printed but all I get is : [QUOTE]Exception in thread "main" java.lang.NumberFormatException: …

Member Avatar for masijade
0
131

The End.