32,204 Topics

Member Avatar for
Member Avatar for Consuela94

Hey everyone, iv'e been working on a Hangman code for weeks for the beginning of a semester long portfolio, iv'e tried several codes, but no matter what i do i can't seem to make it work... The specifics for the program were: - Create a list of possible words called …

Member Avatar for Consuela94
0
5K
Member Avatar for Muzzla

Hi there, I've been trying for hours to get my Dijkstra algorithm to print the correct path. It collects the correct distance properly, but I just can't get it to print out the path of nodes that it uses! Any help would be great appreciated. 'route' is my string variable …

Member Avatar for NormR1
0
616
Member Avatar for Ubi2073

I've been doing this for the school assignment. So the whole idea of this program is to use random numbers to disguise a message by translating it into pairs of numbers; or to reveals messages by translating a series of pairs of numbers back in to the original characters. It …

Member Avatar for NormR1
0
294
Member Avatar for Lamirp

Hey guys and girls, first post here been reading for a few days but I am pretty new to java and I have to edit a class to import a file into an array. The class initially defined the array within itself. So I made my changes and I am …

Member Avatar for Lamirp
0
180
Member Avatar for alastair1008

basically my program runs like this 1. open up configure GUI 2. get congiguration 3. close configure GUI 4. open up main GUI now when I am testing in netbeans, this works perfectly however, as soon as I compile and try to run the jar file outside of netbeans the …

Member Avatar for alastair1008
0
217
Member Avatar for hwoarang69

i want to how when is my player is jumping, statding, or falling. for some reason it only goes in fall == true if statment. in my paint method iam printing different images. bc testing what is player is doing. i have main_class and player_class. //in player class public void …

Member Avatar for NormR1
0
244
Member Avatar for Tomi1988

I give the value of three reference types (Integer,String,List) to a function to change it. But only the value of List changed, but Integer and String are reference types too. Why can't I change their values too? public static void main(String[] args) { Integer i = new Integer(1); String s …

Member Avatar for JamesCherrill
0
238
Member Avatar for julm

I am writing a java program that solves for program complexity using Halstead metrics. I just want to know what java keywords are considered "Operators" and "Operands" in halstead metrics. Any help from you guys will be appreciated...

Member Avatar for dansm88
0
911
Member Avatar for oateye

I am working on a minesweeper project and everything is working fine EXCEPT for when you click on a cell and it contains a 0 (no mines around it) and it is supposed to open all the other "0" cells around it using recursion. Right now, I keep on getting …

0
293
Member Avatar for gaurangj

import java.io.*; import java.io.Reader; import javax.servlet.*; import javax.servlet.http.*; import org.w3c.dom.*; import javax.xml.parsers.*; import java.net.*; import org.xml.sax.*; public class HelloWorldExample extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException{ response.setContentType("text/html"); PrintWriter out=response.getWriter(); URL url=new URL("http://cs-server.usc.edu:10724/my1.php"); URLConnection urlConnection=url.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); String xmldata; while ((xmldata = in.readLine()) …

Member Avatar for NormR1
0
172
Member Avatar for taylor.mitchell.353

I have been working on this method for six days without any luck. I should have talked to you earlier. This method is from the book, but it only is deleting California. I cannot figure out why. I tried a couple different methods(recursive and others) and none of them worked. …

Member Avatar for NormR1
0
217
Member Avatar for funtoosh

I'm trying to load an image in an Applet.The code goes fine and the Applet Window starts but it just gives a blank window instead of showing the image.I put the html file,.class file and the image file in the same directory.Can u figure out where I went wrong?? Here's …

Member Avatar for shanker31
0
1K
Member Avatar for Aninda

Iam trying to implement ternary tree in java but i have got exception in printnode method..i couldnot figure out the exception it will be great help if any one help me to figure out this Thanks in advance here is the the code exception Exception in thread "main" java.lang.NullPointerException at …

Member Avatar for NormR1
0
188
Member Avatar for crownedzero

I see this example frequently and thought I'd give it a shot but I've got something unexpected happening with my Queue. I have multiple threads utilizing my producer class but the output doesn't show that it is being written to by each thread. protected Queue<ProductMessage> prodQueue = new ConcurrentLinkedQueue<>(); @Override …

Member Avatar for ~s.o.s~
0
279
Member Avatar for WDrago

All, I am working on a simple program that reads temperature, humidity, and dew point from a sensor and logs the result to a .csv file. I am using netbeans and using alt-enter to surround code with try-catch whenever netbeans suggests. The result is pretty ugly and I can't imagine …

Member Avatar for WDrago
0
1K
Member Avatar for hwoarang69

AffineTransform tx = new AffineTransform(); tx.translate(0, 100); tx.rotate(233); tx.setToRotation(34, 333, 333, 222); g.drawImage(player_image, x, y, x+width, y+height, 50*(int)frame, 147, 50*(int)frame+50, 189 ,Sprite_Sheet.m1); not sure what iam doing wrong. this code below just display image g.drawImage(player_image, x, y, x+width, y+height, 50*(int)frame, 147, 50*(int)frame+50, 189 ,Sprite_Sheet.m1); now how can i flip it …

Member Avatar for JamesCherrill
0
116
Member Avatar for KRUX17

Hello, I'm having trouble with the ArrayList add method it seems to be giving me an error in BlueJ. It say's no sutiable method found for add(int) method java.util.ArrayList.add(int,Order)... And how would I create a new object inside a method which will add the parameters to the arraylist. Thanks Here's …

Member Avatar for KRUX17
0
171
Member Avatar for hwoarang69

i create a program using java and jframe. now how can i put it on desktop so that i dont have to keep on opening eciplse to run the program. is there a way to put it on desktop with a icon. so i can click it any it will …

Member Avatar for JamesCherrill
0
275
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
238
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
129
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
277
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
141
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
240
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
917
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
527
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
140
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
483
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
215

The End.