35,618 Topics
![]() | |
I have created a table named student including column stu_id, stu_name & Blood_group.I created a delete button to delete rows and I used the following code when delete button is pressed.I take input using jtextfield.But this can only delete by taking input in stu_id.But now i also want to delete … | |
Hello all. For my project I have to create a snack machine with mints and cookies. So far I have gotten an array of cookies with the code below. However an interesting problem I'm having is my output: OATMEAL cookie LEMON cookie null CHOCOLATE_CHIP cookie OATMEAL cookie LEMON cookie null … | |
Hi everyone, I have a little problem with my code right now. For a project, we are to create a snack machine with cookies and mints using a GUI. We are given nickels, dimes, and quarters to enter in. The problem is when I enter in 1 nickel and 6 … | |
Hello all. So I have a little problem with my school project. We are to create a snack machine with cookies and mints and interact with it using a GUI. We click the add Mints or Cookies button to add to the 'Snack Machine' and then click buy to purchase … | |
Hello, The program below selects two shapes at random from a choice of four shapes (line, rectangle, oval and rounded rectangle) and draws them onto an applet. Once six such shapes have been drawn, the screen is cleared and the above process continues indefinitely. The issue I am having is … | |
I have a Java application i've written, it's a chess client that i've done as a hobby project, and it has a main applicatoin window and all the windows are contained in that. I've had a number of requests from mac users that they'd like to see it converted to … | |
Hi folks, I have been making a marquee scroller that reads the text coming from the right to the left, so setting a JLabel's text using setText() starting with 60 spaces and one character-long substring, to zero spaces and 60 character-long substring. I've noticed that immediately, the jlabel's text starts … | |
Hi. i made a database table table and i showed it in a jframe through jtable.I want to change my column name displayed.So far i used the follwing code. private void Update_table(){ try{ String sql="select stu_id ,stu_name ,Blood_group from student"; pst=conn.prepareStatement(sql); rs=pst.executeQuery(); md = rs.getMetaData(); int columnCount = md.getColumnCount(); Vector … | |
this is java webservices code and please convert to C# webservices code, just change for me , i think you understand my probelm, and please do for me here is a code below , <div>import java.io.FileOutputStream; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.util.Enumeration; import java.util.Properties; import java.util.Vector;</div> <div>import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; … | |
Hey guys! So I'm trying to create a method that takes in a list of integers into an array and prints the elements inside the array line by line. How do I print the the elements? Here's what I have so far: public class Main { /** * @param args … | |
Hello Im trying to do some basic FTP work. What I am trying to do is: 1: Search for a folder named "hi" in "C:". If hi exists, enter it. If it doesnt, create it THEN enter it. 2: Inside hi, count FILES and see if there is greater or … | |
hello i' trying to take out data from start time and end time from my database record..any idea how to solve it for example: 2012-09-08 12:09:33 roadA 2012-09-08 10:49:09 roadA 2012-09-08 10:39:27 roadC 2012-09-08 09:09:33 roadA if i select 10:39:27 to 12:09:33, then only 3 data will be display... | |
hi, i am buliding a website as my mini project. problem: when i submit registration form, if the username or email or even both already exist, I have writen the code to check if either of them exist in the database.. and that is working great.. and if the user … | |
Hi all, A problem asks me to create a point class,line class composing two points, a triangle class composing three lines.Also a right angle triangle and an equilateral triangle class both inherit triangle class.I did this. public class Point{ private int x; private int y; public Point(int x,int y){ //error … | |
Hi all, I know that Vector is synchronized, when I run the following program public class ClassA extends Thread{ static Vector<Integer > v=new Vector<Integer>(); public void run() { callMethod(); } public void callMethod() { System.out.println(v.size()); v.add(0); System.out.println(v.size()); v.remove(0); } public static void main(String[] args) { for(int i=0;i<1000;i++) { ClassA a=new … | |
Here is my code.... It is supposed to go throught this maze and can move where there are "." and blocked by "#". I keep getting an out of bounds error. Can anyone help me? import java.io.*; public class ProgramMAZE { public static char maze[][]= {{'#', '#', '#', '#', '#', … | |
Mirroring is done by copying. Suppose a Picture has H rows of Pixels and W columns of Pixels and W is an even number, like W is 2N. Here N is a the whole number that is exactly 1/2 of W. How many Pixels are copied when the Picture is … | |
Hi All, For homework I had to write a "guessing game" program, which I decided to take to another level and add on the option to add names and keep a score, etc. The problem is however, That my program will not display the text "*Player* Has Won! Congratulations!". Here … | |
Ok guys i have a few questions about implementing a gneric hash table using linear probing. Ok first, i need to make an entry class Entry<K,V> then An Entry <K,V> table array but since its gneric must initiatied elsewhere my question is how does the class entry work , from … | |
I would like thoughts/advice on the project I am working on. I am trying to build a program that simulates the score of a baseball game given individual player statistics. As of right now, the program only has one team batting for nine innings. I am a computer science student … | |
Is there any easy IDE that lets you build a easy GUI with Java? I wish you could comply native Java using VS! :P | |
I have created an awesome text-based battle game, and i want others to see it. Is there a way to put this game online, without others stealing the code, but they can play it? | |
Hi all, can someone help me find what's going wrong in my code? When the program runs and it goes to get the user input, the program does not respond with any feedback, ie I type find Susan, and it does not tell me if Susan is in my txt … | |
In this example, what's the difference between creating a class variable from the "class Employee" & creating an object from the class GenQueue ?! What's the difference in uses and implementation? import java.util.LinkedList; class GenQueue { private LinkedList list = new LinkedList(); public void enqueue(E item) { list.addLast(item); } public … | |
Hi, I am looking for a java code which will provide the automatic login with out loading the login page also.After login automatically, i want to go to next page automatically. Can anyone help please.. | |
So I am trying to make a code that will read a file that contains an unknown number of students and an unknown amount of scores for each student. Then output each students average score. I have tried several different combinations of loops and each times some problem comes up. … | |
Hi, I've used keylisteners multiple times, but I am having trouble with this situation. I want the keylistener to recognize a series of characters. For example, if 'e' is typed, I want the program to listen for 'l', then 'e', etc. (spelling "elephant", if you wanted to know). It recognizes … | |
lets say i am print a image on screen. with (x1,y1,x2,y2,sx1,xy1,sx2,sy2) g.drawImage(player_image, x, y, x+width, y+height 0, 0, 30, 20 ,Sprite_Sheet.m1); so how would i flipthis image vertically. | |
I'm taking a beginning java class and I'm trying to create a helper method to get a input from a user and combine all four methods into a package I can use in my programs after. I keep running into trouble with the last method, getMenuStringFromUser, the error it gives … | |
Hey, been awhile. I'm working on a portal for distributors, some type of JIT (just in time) implementation. Now i've been reading alot on DB so i can implement the right database and the right data structure. Now i see, i can do alot more then i'm use to do. … |
The End.