32,199 Topics
| |
Hi, I am doing a project on picture editing and i have a null pointer exception in blur and i can't find out what's wrongs.. AIn this project i only can load .bmp images below is the code. Help me pls. Code: [B]Effect Class[/B] [CODE]import java.awt.image.BufferedImage; public abstract class Effect … | |
[CODE] import java.sql.Statement; import java.sql.Connection; import java.sql.SQLException; import java.sql.DriverManager; import java.sql.ResultSet; class db { public static void main(String arg[]) { Statement statementObj=null; Connection connectionObj=null; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); connectionObj=DriverManager.getConnection("jdbc:odbc:sensorData","",""); statementObj=connectionObj.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); System.out.println("do not worry ho ga yr ho ga"); statementObj.executeUpdate("INSERT INTO hardwareData (Time, Date, humidity, Temp, DiesalLevel) VALUES('1','12','3','s','a')"); connectionObj.close(); } catch(ClassNotFoundException … | |
I have a Coin class that compares weight and value and I need help developing a hashcode and Junit tests to test them, here is my class: [CODE]public class Coin implements Comparable<Coin>{ public static final int CENT=1, NICKEL=5, DIME=10, QUARTER=25; private int value; private double weight; public double getWeight(){ return … | |
Hello! I have a minheap class that is implemented as a priorityqueue and it works fine as far as to the iterator that I have to implement as a innerclass. But I can't get it to work properly. Here is part of the code: public class MinHeap<E> extends AbstractQueue<E> implements … | |
cant compile the code...please help me![code]import java.io.*; class football { public static void main(String args[])throws IOException { BufferedReader stdin = newBufferedReader(newInputStreamReader(System.in)) String str; int num_team,num_win,num_draw,total_point,point; for(num_team=1;num_team;num_team++) System.out.print("Enter team compete"); str=stdin.readLine(); num_team=Integer.parseInt(str); System.out.print("Team 1"); System.out.print("Enter total win"); str=stdin.readLine(); num_win=Integer.parseInt(str); System.out.print("Enter total draw"); str=stdin.readLine(); num_draw=Integer.parseInt(str); total_point=(num_win*3)+(num_draw); System.out.print("Total point for team 1 is" … | |
How do I take to set up for network connect with Socket. I make the JList to press Go to run the post processing (like files). I feel about it and it is not work for me I try to figure out. Thanks. [code] public final static int port = … | |
Hi all I have a program that is written in java and have three different executables program.sh, program.bat, program.jar. i can starts the gui by using program.jar and then in gui i can enter parameters. but as i want to run it over several parameters and get the outputs. i … | |
Hi there, I understand that this question might be better off in "hardwareAndSoftware/LinuxAndUnix/LinuxApplicationsAndSoftware". But the truth is, that it takes for ever for someone to respond to posts there, because I don't think anybody visits that forum alot. Anyways, back to the point... I'm trying to install the Java 1.6 … | |
I am using the following string and Java code to create a user on a Linux box via Java. [CODE=java] ... String x = "/usr/sbin/useradd -g users -s /bin/bash -c 'FIRST M LAST, STERK,DIV-DIS-OFF,123-456-2913' -p 2342asdfa231rcawef09 -d /home/flast -m flast"; RunCommand(x); ... [/CODE] However, upon execution it spins a list … | |
I'm creating an NBT viewer in Java. It works fine as a console application so I used code to rewrite all console (system.out.println) text to GUI text. It works but it does not use scrollbars correctly. Here is my code (For my window/GUI void) [code] private static void createAndShowGUI() { … | |
Hi everyone... I made a simple java game in Eclipse Helios ver. 3.6.1. Now i want to send that game to my sister as an Executable. Can someone please explain to me how i do it? Thank you very much... | |
hi my problem is that i want to show some information about button when clicked on that button but that information must be displayed below that button so and in the same menu so for that what used i am think about popmenu is this right | |
Hi. Im pretty new to java. First question: is javascript the same as java? I just want to make sure. So for my program. Since im a very basic beginner with some c++ experience i was hoping the forum could help. I want the user to input the deck name … | |
hi, I have an application that i got from someone for my friend website. it is using java in the server side and also using flex in the front end it connects random webcam user to each other i would like to add something to it that will play some … | |
Hi all, I'm trying to write a program that holds student data in arraylists. I've managed to get all the adding, editing, deleting, displaying etc. working and now all I need to do is to make sure it saves on exit and loads on startup By following another tutorial, I … | |
hii everyone i am mohit a student from chitkara university,solan, himachal pradesh. i just want to create a chat server in java like facebook... please help me for this task.just give me basic idea how i can implement this thing.. | |
hey there..im planning to build an enterprise system (recommended by my prof)as my thesis next year.. but i dont really have a good background about enterprise systems.. just wanna ask if do i need sepatated databases or just one.. | |
I have a question not related to a java program in particular. I am a recent college graduate and was thinking about getting a java programming certificate. I am just trying to get some feedback if this would be recommended to finding a position as an entry level java developer … | |
hey, i got a class called IRPanel this class contains a few methods that handles what is drawn on it. randomPoints() is a method that generates random values for x and y coordinates for random point. new random point coordinates are generated only when the coordinates from IREvent() method match … | |
Hey everybody, the program I am writing takes 10 digits as a floating point as a number then displays the average of the numbers and any numbers that are greater than it after it. My program will compile but every time I run it through I get the error message … | |
I am writing a program that needs to be able to respond to keyboard actions regardless of what application has the focus at the time but after hours of searching the internet I have found no way to do this. for example, the program needs to be able to respond … | |
I'm in the process of creating a program that would change a background color by pressing a button. Now, I already have everything set up. The background image is just an image of a rainbow, and when a button is clicked, it would change the whole background color. The thing … | |
Hey guys, i just wanted to know the codes for ArrayList class methods such as .clear() .add() .size() .isEmpty() etc... Your help will be appreciated! | |
Hi... How can i develop a keylogger using java?? The problem is that we should only implement KeyListener interface to a window or frame.. but how can we make use of KeyListener event without windows of frame???? | |
trying to finish a code given by sir which was to add the preorder and post order in thr tree but i am getting an error with the preorder so need help. [CODE]public class BinaryTree { BinaryTree left; BinaryTree right; int value; public BinaryTree(int v){ value= v; } public void … | |
copy in your program and then run.. [CODE]void Ubaid(int x)[/B] //this is function x value is 5 or directly set x=5 { // x=5; for(int i=x;i>0;i--) { printf("\n"); for(int j=1; j<=i; j++) { printf("%d",j); } for(int u=i-1;u>0;u--) { printf("%d",u); } [B]}[/B] //start another from here that print the opposite for(int … | |
(Think this is a java problem!!!) When I print a result set of a mysql query it doesn't print the 1st value. I used ResultSet rs = stmt.executeQuery("Select * from names"); while(rs.next()){ textAr.append(rs.getString("name")+"\n"); } This prints the values from index 2.. How can i print all the values.??? thankx in … | |
Guys, Im having trouble working with Jcombobox. I have this action listener in Jcombox that would get the ID of the current selected item which is a query from my db. here's my simple code: //clientName is the variable I declare for my JCombobox. private void clientNameActionPerformed(java.awt.event.ActionEvent evt) { //db … | |
I wanted to create a graph of connected nodes (eg- node 1, 2, 3. 1 connected to 2 and 2 connected to 3). How can I do this? I searched and found that JUNG (the Java Universal Network/Graph Framework) can be used to draw such graphs. But I am unable … |
The End.