35,618 Topics

Member Avatar for
Member Avatar for shihab2555

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 …

Member Avatar for shihab2555
0
239
Member Avatar for tingwong

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 …

Member Avatar for JamesCherrill
0
1K
Member Avatar for tingwong

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 …

0
131
Member Avatar for tingwong

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 …

Member Avatar for tingwong
0
278
Member Avatar for javaprog200

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 …

Member Avatar for javaprog200
1
144
Member Avatar for adams161

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 …

Member Avatar for JamesCherrill
0
243
Member Avatar for Ricky116

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 …

Member Avatar for Ricky116
0
930
Member Avatar for shihab2555

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 …

Member Avatar for shihab2555
0
2K
Member Avatar for zubair khalil

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; …

Member Avatar for riahc3
0
528
Member Avatar for laguardian

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 …

Member Avatar for NormR1
0
141
Member Avatar for riahc3

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 …

Member Avatar for Taywin
0
484
Member Avatar for ct_hunny

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...

Member Avatar for aravind326
0
217
Member Avatar for irshsheikh

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 …

Member Avatar for jalpesh_007
0
301
Member Avatar for challarao

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 …

Member Avatar for jalpesh_007
0
194
Member Avatar for anand01

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 …

Member Avatar for anand01
0
186
Member Avatar for bcassillo

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[][]= {{'#', '#', '#', '#', '#', …

Member Avatar for NormR1
0
198
Member Avatar for Monkey101

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 …

Member Avatar for NormR1
0
113
Member Avatar for Malymieczek

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 …

Member Avatar for NormR1
0
163
Member Avatar for nah094020

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 …

Member Avatar for NormR1
0
2K
Member Avatar for coolbeanbob

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 …

Member Avatar for JamesCherrill
0
195
Member Avatar for riahc3

Is there any easy IDE that lets you build a easy GUI with Java? I wish you could comply native Java using VS! :P

Member Avatar for ~s.o.s~
0
298
Member Avatar for gotto

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?

Member Avatar for Aladinone
0
225
Member Avatar for minimee120

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 …

Member Avatar for NormR1
0
247
Member Avatar for sapure

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 …

Member Avatar for riahc3
0
231
Member Avatar for elzaz

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..

Member Avatar for riahc3
0
39
Member Avatar for kristenw17

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. …

Member Avatar for JamesCherrill
0
347
Member Avatar for caswimmer2011

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 …

Member Avatar for JamesCherrill
0
230
Member Avatar for hwoarang69

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.

Member Avatar for hwoarang69
0
135
Member Avatar for asiawilliams

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 …

Member Avatar for Taywin
0
473
Member Avatar for DarkMonarch

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. …

Member Avatar for madCoder
0
154

The End.