31,001 Topics

Member Avatar for
Member Avatar for mastr924

This is part of a connect 4 game. I'm trying to get a picture to move each time a player makes a move by calling paintComponent but java won't let me. How do I move a picture in my code? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PanelC4 …

Member Avatar for Ezzaral
0
90
Member Avatar for Yurii

hello everybody, i ve got a question about my first java program. im trying to write a planner to which you can add tasks or appointments. i created dialog boxes for the user input and they acutally do work. but i want to avoid errors by telling my programm what …

Member Avatar for BestJewSinceJC
0
92
Member Avatar for BestJewSinceJC

In one View, I have text boxes and buttons. In the other View, I have a Pie Graph that I created using JFreeChart. When the button is clicked, I want the Pie Graph to be refreshed, displaying the new percentages (based on what the user entered in the text boxes). …

0
54
Member Avatar for Xessa

Hello people. I seem to connect and select the data i want from a specific and big table. But when the information to be selected is small, everything is allright. But when i try to select information that is not that much small. For example when i select from 3000 …

Member Avatar for Xessa
0
102
Member Avatar for _Rosie_

write an application that finds the smallest and average of twenty floating point numbers entered by the user.Use a for loop to capture the user input and store the numbers in an array. display the smallest number and the average of the numbers entered i urgently write this program can …

Member Avatar for stultuske
0
129
Member Avatar for kingarthur

Hey everybody, i am writing a "database based" application. i organized my GUI with different frame- and panelobjects, which need database information (connection, uernames etc). is it possible, to define those information in an external files and just import these data (like in php)? i tried a solution with an …

Member Avatar for kvprajapati
0
87
Member Avatar for Kishorey

HI, Can Someone help me to do the refresh operation in Java.I need to refresh the panel in java every 5 seconds ..can someone help me provide the code

Member Avatar for Kishorey
0
95
Member Avatar for saptaparni

how do i generate a .html file using java? i need 2 read from a file file and display an applet in a web browser. So i need to include the main() and cannot run an external .html file. Please help.

Member Avatar for kvprajapati
0
58
Member Avatar for coolbuddy059

I've been writing code to develop gatepass system for my college. I've to made space for taking the photograph of the visitor taken by the camera at gates and then save the whole page in the database(actually the structure is already defined). Please suggest what to do.The code I've made …

Member Avatar for kvprajapati
0
164
Member Avatar for coolbuddy059

is it possible to implment OLE in java. Can you send the link where I can know about it + (if possible)then ways to implement it.

Member Avatar for JamesCherrill
0
98
Member Avatar for wslatter

My friend and I are in the process of build a MUD in java. We took Java in highschool, he is continuing with computer science in his college, I am not. I am surprised how much I do remember, but there is a lot I have forgotten. Previously my friend …

Member Avatar for JamesCherrill
0
83
Member Avatar for gauravmishra

hi, i want to make a program that highlights java buttons present on a frame just by bringing mouse over the buttons and this frame may not be part of this program ie it can be from another program but i dont know how to proceed any suggestions.....

Member Avatar for gauravmishra
0
70
Member Avatar for kingarthur

Hi over there, is it possible to execute several SQL Statements with one(!) command? For example something like that: [code] Statement s = con.createStatement(); sql= "CREATE DATABASE MeineDb+ SHOW databases+ USE MeineDb+ CREATE TABLE MeineTestTabelle ( i INT, c CHAR(3), s VARCHAR(8), dt DATE )+ CREATE TABLE MeineAdressen ( Name …

Member Avatar for kingarthur
0
126
Member Avatar for lloydsbackyard

[code=java]import java.io.*; public class bonus{ public static InputStreamReader reader=new InputStreamReader(System.in); public static BufferedReader input=new BufferedReader(reader); public static void main(String[] args) throws Exception{ double salary,bonus; System.out.println("Enter Employee's Monthly Salary: "); salary=Double.parseDouble(input.readLine()); if(salary>=6000){ System.out.println("The bonus is 6000"); } else { bonus=salary*.5; System.out.println("The bonus is "+bonus); } } } } // It only …

Member Avatar for masijade
0
138
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
73
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
196
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
82
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
81
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
77
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
159
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
156
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
248

The End.