31,001 Topics
| |
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 … | |
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 … | |
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). … | |
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 … | |
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 … | |
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 … | |
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 | |
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. | |
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 … | |
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. | |
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 … | |
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..... | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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 { … | |
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 = … | |
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 … | |
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? | |
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"); … | |
Hi all.. I'am newbie in java programming.. I need help to compare two images in java... Plss help me.. Thx for your appreciates.. ^^ | |
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 … | |
| 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! |
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 … | |
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. … | |
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. | |
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 … | |
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 … | |
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>: … |
The End.