32,204 Topics

Member Avatar for
Member Avatar for logicmonster

I am trying to create an array of a custom object and I think the error I'm running into is that the objects within the array are not initialized prior to use (its a run time error, so i'm not entirely sure). The part that doesn't make sense is, if …

Member Avatar for JamesCherrill
0
774
Member Avatar for Joey_Brown

Hello. What is the best way [an a correct one] to check a value, lets say I need a user input in a certain range. Could I place this check inside a setter method? My setter would than be a boolean return type instead of void? Are there some "laws" …

Member Avatar for Joey_Brown
0
3K
Member Avatar for Locane

This program simply creates an array of movies with a star rating for each one. My problem is, I want to have code that adds the contents of the array if the movie is the same. So for my example I was using Frozen Ground as the movie. In my …

Member Avatar for Locane
0
143
Member Avatar for hfx642

I'm using a horizontal JSlider. 1. The thumb slider is pointing [B]down[/B], and the ticks and labels are [B]below[/B] the track. How do I reverse this? I want the thumb slider to point [B]up[/B], and the ticks and labels to be [B]above[/B] the track. 2. How do I increase the …

Member Avatar for mKorbel
0
122
Member Avatar for sballew

The source is available at [URL="http://code.google.com/p/java-cli-api/"]http://code.google.com/p/java-cli-api/[/URL]. It is not yet in the Maven Central Repository, but I did post the initial 0.0.1 release on the Downloads page if you do not want to check out the source. If anyone has comments/critiques on it, I would love to hear them. The …

0
127
Member Avatar for chester1908

Hello all. I started out yesterday trying to understand the point of webservices and how to use them. I found countless tutorials but most of them seemed not enough for what i need to understand or outdated or not "manual enough" so i'd do it myself and get it. IDE …

0
74
Member Avatar for jhamill

So I had to make a program that calculates the volume of sound at a different distance, given a reference difference, and sound level, and the new distance. It works sometimes but depends on what values I put in. Much of the time it tells me the new volume level …

0
94
Member Avatar for yuugib

Hello fellow members, I have recently started to study Java, but the lecturer went through basics very fast and now I'm having problems with starting to write a class. I have an idea of how to write the methods, but how to declare the array properly at the start to …

Member Avatar for stultuske
0
167
Member Avatar for danthevan

Hello I'm a vb.net programmer and I am learning java so I was trying to figure out what is "sender" (VB.net) keyword in java? sender is simply a keyword in VB.net, for example you have multiple buttons having the same event and the code but you differentiate them in the …

Member Avatar for danthevan
0
269
Member Avatar for sasikrishnasamy

Can any one tell me why continue statement is not working in if ? i tried with following code [CODE] outA: if(userValue==randomValue) { int luck=s.nextInt(); int randNo=(int)(Math.random()*(userValue*2+(1))); int arrValue=point[i]; arrValue+=userValue; point[i]=arrValue; continue outA ; } [/CODE] but it shows error

Member Avatar for sasikrishnasamy
0
177
Member Avatar for jhamill

Hey so I've been working on a lab for my intro to software developing class and have been trying to get my program to work for several days now. It's a real basic program, im sure someone will be able to figure out the issue im having. Hopefully once I …

Member Avatar for jhamill
0
229
Member Avatar for divsok

Does anybody have a login using access code of y.daniel liang, Introduction to Java Programming, Comprehensive Version, 8E. thank you if you give it to me to share video chapters..:)

Member Avatar for DarkLightning7
0
79
Member Avatar for aungmyohein

"aung myo hein" to "nieh oym gnua" how to convert with CharAt GUI JTextField or JOptionPane

Member Avatar for woodenduck
0
186
Member Avatar for cloris

Can i get the codes for Bresenham Line Algorithtm. I have searched for it on google and i get the codes but they do not attach the codes to call the class, and also the codes do not allow user input. Am now learning java so adding comments would help …

Member Avatar for JamesCherrill
0
97
Member Avatar for EricaMitchell

Hello i am new to java and o have to write a program that determines the number of prime numbers less than N which is given by the user, but i have no clue where to start

Member Avatar for anas2ahmad
0
94
Member Avatar for jackmaverick1

I get this error, [CODE]Exception in thread "main" java.io.IOException: Cannot run program "java -jar C:\Users\Jack\testFile.jar\" (in directory "\"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at testProject.Main.main(Main.java:15) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) …

Member Avatar for hiddepolen
0
246
Member Avatar for ricedragon

Okey I am making a simple chess program as an assignment and I ran into a few problems I coded a file called ChessPiece which is the Base class of all the chess Piece eg King ,Queen and etc... We have to create a interface class call ChessPaint that draw …

Member Avatar for JamesCherrill
0
635
Member Avatar for dennysimon

hello all where is the directory to place file below import com.toedter.calendar.JDateChooser; is it correct if the extracted folders and files be placed in folder c:\com\toedter\calendar\JDateChooser ? or because i place my source file in c:\java\src do i have to place the extracted folders and files in c:\java\src\com\toedter\calendar\JDateChooser ? I …

Member Avatar for JamesCherrill
0
266
Member Avatar for ali11

can somebody help me with switch statement. [CODE] import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.math.*; import java.util.Vector; public class Ahsan extends JFrame{ Stack s = new Stack(); private JFrame f; private JPanel p1,p2; private final int ADD = 1; private final int SUBTRACT = 2; // declare …

Member Avatar for JeffGrigg
0
2K
Member Avatar for dennysimon

hello all is there available code to remove line numbers in front of each line of a text file thank you denny

Member Avatar for adarshcu
0
145
Member Avatar for ali11

First i create simple claculator.but now I am trying to change it to RPN calculator by using stack.Can some one help me((especially where to use pop method) because I don't know alot about stack.here is my codes so far. import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import …

Member Avatar for ali11
0
137
Member Avatar for some00001

Hello, if i want the computer to guess a number between 1 - 100 i'll do in java [CODE] int min = 1; int max = 100; [/CODE] I have already create a random number for the computer. so the first random number the computer will choose is 49 as …

Member Avatar for DarkLightning7
0
88
Member Avatar for jet101

Hi guys, it's been a while since the last time I post here... I'm currently learning JPA right now for my J2SE project, I dont have problems doing CRUD on a single table, now I want to try to retrieve data on JOIN tables. example if I have 2 entities …

0
70
Member Avatar for ashsailesh

hey guys i am developing a game... in which when i press a button it has to change its color... so , i created button, used action listener to it... [CODE] if(ae.getActionCommand().equals("b1")) // here b1 is the button { b1.setBackground(Color.black); frame.invalidate(); frame.validate(); System.out.println("button b1 pressed...!!!"); } [/CODE] i also used …

Member Avatar for hfx642
0
181
Member Avatar for baseballer

I have this project that I'm working on for my class, but I'm getting stuck with infinite loops and I'm not really sure what's wrong. I'm supposed to assume that at time 0, the ball is at height 0 and the velocity is input by the user. After each second …

Member Avatar for hfx642
0
114
Member Avatar for .Tyler

Hey guys. I need help with a program I'm trying to write. I need to read scores from an ASCII file and display them. I also need to display an error message for any score that falls outside of the range of 0 to 100. And after doing that, I …

Member Avatar for JeffGrigg
0
99
Member Avatar for lbgladson

I have an assignment to create Random Shapes by creating a method randomShape that randomly generates objects implementing the Shape interface. This is what I have so far and don't know where to go from here. [code] import javax.swing.JFrame; public class RandomShapeViewer { public static void main(String[] args) { JFrame …

Member Avatar for JamesCherrill
0
157
Member Avatar for AngelAmi
Member Avatar for stultuske
0
87
Member Avatar for selma_ter

I use this part to make transparent the JFrame: [CODE] GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); boolean opacity_supported = gd.isWindowTranslucencySupported(java.awt.GraphicsDevice.WindowTranslucency.TRANSLUCENT); if( !opacity_supported ) { System.out.println("Your platform does not support opacity."); } else { setOpacity((float) 0.85); }[/CODE] It works perfect on Windows. On the same machine I use also …

Member Avatar for woodenduck
0
175
Member Avatar for kelvin924

The End.