32,199 Topics

Member Avatar for
Member Avatar for Web_Sailor

Hi Ezzaral... As per my last problem which is solved. So as I told you that I want to add GradiantPaint. This is the code that I came up with. This code is compling but giving me some runtime errors:. Please find the error report below- [CODE] import java.awt.BorderLayout; import …

Member Avatar for Web_Sailor
0
284
Member Avatar for localp

[code] try { //1.Load the database Driver class Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); //2.Make a connection to the database Connection conn = DriverManager.getConnection( "jdbc:odbc:MyDataSource"); Statement stmt = conn.createStatement(); String x = jTextField1.getText().toString(); [COLOR="Red"] String sqll ="UPDATE Patient_Comp SET taken='Taken'WHERE ID="+x ; ResultSet rs = stmt.[COLOR="Green"]executeQuery[/COLOR](sqll);[/COLOR] [/code] This is what i wrote to update a …

Member Avatar for ~s.o.s~
0
251
Member Avatar for stewie griffin

hi, im working on java on some client server project... in the project the client and the server can send files, but im failng to do so, the resiver get only part of the file... here is my code sender: [code] public void uploadByteFile(String fileNameToGet, File fileDst) { try { …

Member Avatar for stewie griffin
0
153
Member Avatar for freelancelote

Hi, I'm having trouble with the following simple test program to extract 10 random numbers from 0 to 5. [CODE=java] import java.util.*; public class TestRandom { public static void main(String[] args) { Random rand = new Random(); for (int i = 0; i < 10; i++) { int j = …

Member Avatar for freelancelote
0
6K
Member Avatar for alexdoc9999

Hello all. I am new to this discussion forum and would greatly appreciate anyone's help on this one. This is a great site!! Thank you all for being here. Here's my problem: I'm working on an application that has a JPanel that is a grid layout with three columns of …

Member Avatar for alexdoc9999
0
112
Member Avatar for Isy

I have created a mobile game in netbeans and need to connect to web sevice through Java ME web service client, I get the proxy setting error which does not allow me to connect. Has anyone come-up with this problem?

Member Avatar for Isy
0
75
Member Avatar for aru211285

i need to extract the number part from the string which looks like "(7 r 8digits).txt". i need to store this found string in some variable, but i am confused wih the groups twhether o get the string as group() or group(1). Pattern p = Pattern.compile("\b[0-9]{7,8}\b"); Matcher matcher = p.matcher("num"); …

Member Avatar for Ezzaral
0
112
Member Avatar for daniel_ahuk

Hi all.. I'am newbie in java programming.. I need help to compare two images in java... Plss help me.. Thx for your appreciates.. ^^

Member Avatar for BinodSuman
0
197
Member Avatar for George2

Hello everyone, I am working on a dictionary application implementation. I have question about a string pattern matching algorithm implementation. In this algorithm, * can be used to match any sequence of characters. The input is string s1 and string s2, the algorithm using s2 to match s1, and the …

Member Avatar for javaAddict
0
441
Member Avatar for sravan953

Can somebody tell me the code for: a-(a^3(power of 3)/a)+a^5/a-a^7/7........n The code has to contain only for, if, while and other basic statements....please help me!

Member Avatar for javaAddict
0
83
Member Avatar for praveenrajmat

Hi All, I need to print documents ( MS-DOC, PDF, Plain Text ) using Java API. I do not need window for configuring number of pages to be print etc etc.. Whatever the file specified should be printed. I checked with [CODE]printerJob.print();[/CODE] from java API and able to print simple …

Member Avatar for JamesCherrill
0
168
Member Avatar for bananas

im using the book java in 24 hours. i still need to learn about input but disregard that i only wanna know you opinians about my code thanks for your support [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. …

Member Avatar for bananas
1
82
Member Avatar for puk

Hi, im writing an application in java that collects a number consisting of 5 digits,for example, 11234 from the user. The problem i have is that i want to separate the individual digits and display them separated by 3 spaces. thank you in advance for your help.

Member Avatar for javaAddict
0
78
Member Avatar for Web_Sailor

Hi, I have to add a mouse over event and mouse click event in my rectangles that I draw while taking the values from an input file. Now since I am taking rectangle height and width from the input text file as well I also want to take a text …

Member Avatar for Web_Sailor
0
162
Member Avatar for lloydsbackyard

hello, i have a code below and i dont know how to make a string input for me to input hte name of the student...kindly check it out... [code=java] import java.io.*; public class io { public static InputStreamReader reader = new InputStreamReader(System.in); public static BufferedReader input= new BufferedReader(reader); public static …

Member Avatar for lloydsbackyard
0
157
Member Avatar for JohnPhilipps

Good morning, I am quite new at java and in the learning process. I have a log file with the following data contained in it: mai 4 03:26:53 pcjournal Dock[345]: Corrupt JPEG data: premature end of data segment mai 4 03:26:53 pcbookscuba [0x1-0xa01a].com.apple.dock[345]: Tue Jun 2 03:26:53 macbookscuba.local Dock[215] <Error>: …

Member Avatar for JohnPhilipps
1
250
Member Avatar for mahdi68

Hi i write a calculator ,This calculator get an arithmetic expression written in infix notation , then change it to postfix notation , then finds the value of postfix notation . i have a problem , this program only work for one digit numbers :( please help me to slove …

Member Avatar for NeoKyrgyz
0
154
Member Avatar for theCRK

[QUOTE] Hi, I have a java assignment due in a couple of hours and I am stuck and i am getting a lot of errors in my code, if someone out their can help me out, i would appreciate it, thanks.[/QUOTE] here is my java assignment......... [ATTACH]10388[/ATTACH] [QUOTE]this is the …

Member Avatar for VernonDozier
0
327
Member Avatar for dumbncool

Hi, I have a client written in java applet and it listens for responses on http: //localhost/CardPager. Now, I have a server code written using jsp servlets and a webpage for a user where I can write a message in a textbox and press the send button, the text message …

Member Avatar for dumbncool
0
67
Member Avatar for mrriz

Hi, i am looking to create a standalone ordering system for a fast food business as project using java (but perhaps another language if it is easier). I want the system to be able to run without an operating system ie the program should run from booting from an USB …

Member Avatar for Xhamolk_
0
111
Member Avatar for bharatshivram

hi i have written a small chat application.. gui created using frames.. both can send text to one other using socket programing over the localhost.. is it possible to send files too along with just text?? Pls help Regards, Bharat Shivram

Member Avatar for JamesCherrill
0
92
Member Avatar for kaluxx

hello we use the class io.*; in our college we use in a unix platform which is import io*.; i am trying to code a code so taht i can get a string input i tried ConsoleInput.readString, and also ConsoleInput.readLine() but still i get an error it says that readString …

Member Avatar for masijade
0
97
Member Avatar for java-utm-stg

hi We are creating a program for class which will take keyboard input and then get the instructions from that basically there could be as many as 4 instructions currently I am doing the following [code=java] System.out.println("Enter Input: "); humanInput = br.readLine(); StringTokenizer humanInputBrokenUp = new StringTokenizer(humanInput, " "); if(humanInputBrokenUp.nextToken().toString().equals("exit")){ …

Member Avatar for VernonDozier
0
78
Member Avatar for suncica2222

I have array of 10 JFrames instanced and I want to kill 3 or 5 or n if them,but not all!!! how should I do it? and where? in constructor or in main...? [CODE]public class KlasaMrdanje extends JFrame { public int kontrola1; public KlasaMrdanje(int kontrola) throws Exception //KAKO DOBRO SA …

Member Avatar for Xhamolk_
0
89
Member Avatar for daxxin2002

I have corrected a few errors,the code compiles and excutes for sure. how do one convert a truth table to boolean equation,I can convert the other way round like below; //Suppose Z = (A.B + C)' public class Boolean { public static void main(String[] args) { int a,b,c,z; System.out.println("A B …

Member Avatar for sammynove
0
648
Member Avatar for farooq82

I doing my University assignment. I need help for accessing html option button values using Java Servlet. Any help in this regard. [CODE] <html> <head> <title>Result</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <h3> Select one option for each MCQ</h3> <form method="get" action="http://localhost:8084/MCQs/Webapplication1/src/java/serverlet"> <table width="730" border="0"> <tr> <td> <strong>1. Java is …

Member Avatar for peter_budo
0
111
Member Avatar for Logi.

Hi there, I'm working on a UI for a program ive been writing for the past few weeks and have encountered a problem getting my windows to pass input control.. My main program runs in a window which extends Canvas and implements Keylistener and is opened by: [code=java]MainWindow myWindow = …

0
65
Member Avatar for titosd

Hello, I have a problem with this method: [code=java] public boolean addRaceDrivertoTeam(String driverLicenseNumber,String nationality,String constructorName, String fullName, Date dateOfBirth , int worldChampionships, int totalScore, int highestRaceFinish){ RaceDriver driver = new RaceDriver(driverLicenseNumber,fullName,nationality, dateOfBirth,worldChampionships,totalScore, highestRaceFinish); Constructors con; con = Constructors.valueOf(constructorName); RaceTeam team= new RaceTeam(con); if (driver.getRaceDriverKey()!=null) if (raceTeam.containsKey(con)&&(driver != null) && !team.isDriverExists(driver)){ …

Member Avatar for titosd
0
126
Member Avatar for suretd

Good Day All, I have a problem with a database program. The program is to create a database for a Stocktracker program. The details for the code, I got directly from our textbook, and it compiles perfectly, but as soon as I run the program it gives me the following …

Member Avatar for suretd
0
128
Member Avatar for KimJack

Hello all, I am trying to display time in the following format that represents hours and minutes: hh:mm [code] public String getTime() { String time = String.format("%tI:%tM", hours, minutes); return time; } [/code] For some reason I keep getting the following error: "The method format(String, Object[]) in the type String …

Member Avatar for Xhamolk_
0
194

The End.