32,207 Topics

Member Avatar for
Member Avatar for rajeshredy

Here is a item tablelist.Its a JCombobox.I wrote the itemlistener for it. The problem is when ever i select an item in it for the second time onwards i am unable to see the data in the listScroller in UI,but i can see the data in the console. Ewerything is …

Member Avatar for JamesCherrill
0
75
Member Avatar for corliss

Hi All, I am having a bit of an issue moving back into Java. The issue that I am having is that I am trying to call a method of a custom class that has been instantiated in my main java file from a form that is also in an …

Member Avatar for StephNicolaou
0
167
Member Avatar for pbracing33b

I am having problems with this line of code: --System.out.println(line +"is ranked at" + location + " in popularity amoung girls with" + model.getFrequencyListName(location));-- what it is telling me is that I need an int method for getFrequencyListName, and I have have one but it is for an array. Obviously …

Member Avatar for Zaad
0
182
Member Avatar for powerdink

I need some help. I'm trying to create a number pad like a cellphone that captures user input by pressing buttons in a panel on the left and displaying what the user punches in the top panel. Then I have a clear button in the panel on the right to …

Member Avatar for JamesCherrill
0
191
Member Avatar for aanders5

Okay, so what I am trying to do is pull user data from a phpBB forum site, basically just what a member's ID is, their "rank", join date, and the other information fields that are generally displayed on their account to the public. The problem is, the site is setup …

Member Avatar for peter_budo
0
284
Member Avatar for samthelamb

I dont understand how to do this, my teacher suxs at teaching. He's a smart guy, just a really dumb teacher.. Have you ever had one of those teachers? Its a pain. Anyways This is due before 12am tonight..Please Help me solve it::: Create a hangman program. Sample output from …

Member Avatar for harinath_2007
-2
213
Member Avatar for gouki2005

Hi guys i am having this exception [I][I]Initial SessionFactory creation failed.org.hibernate.MappingException: Foreign key (FKF5B10F06F8C1E633:detalle_pedidos [pedido_id])) must have same number of columns as the referenced primary key (pedidos [pedido_id,cliente_id,empleado_id]) Exception in thread "main" java.lang.ExceptionInInitializerError[/I][/I] according to this my table pedidos mismatch detalle_pedidos here pedidos pojo [CODE]import java.math.BigDecimal; import java.util.Date; import java.util.HashSet; …

Member Avatar for Zaad
0
202
Member Avatar for askylitcity

Hi, I'm having an issue with the following directions: public static int aPower(int a) Given a number a > 1, Returns a number n such that for some m > 1 we have a = n ^ m. If no such n exists it returns 0 public static int aPowerOf2(int …

Member Avatar for Zaad
0
102
Member Avatar for kei01040

[CODE]import static java.lang.System.*; public class ShipTester { public static void main (String []args) { Ship s1 = new Ship(); s1.setX(3); s1.setY(10); s1.setSPeed(22); out.println(s1.getX()); out.println(s1.getY()); out.println(s1.getSpeed()); out.println(s1);//calls the ToString method Ship s2 = new Ship (3,10, 22); ship s3 = new Ship(5,7 ); s3.setSpeed(19); out.println(s1.equals(s2));//s2 becomes rhs out.println(s1.equals(s3));//s3 becomes rhs } …

Member Avatar for Zaad
0
107
Member Avatar for philipghu

Hi, it is kind of a beginner's question... I'm trying to read user's input from keyboard. The user types in: a1 a2 a3 b1 b2 b3 c1 c2 c3 ... in which each line has three integers separated by a space. Every three integers are on the same line. [CODE]Scanner …

Member Avatar for turt2live
0
115
Member Avatar for tran21

it's my homework and i have no clue what i'm doing. i pay attention in class but i still don't know what's going on! it's a 2 part project, with a cointoss class and histogram class. this is my cointoss class [CODE]import java.util.Scanner; public class CoinToss { private static final …

Member Avatar for tran21
0
643
Member Avatar for moonL!ght

hellow, i wondering will be able to draw a pi chart with diffrent scetions colored diffrently with out using Graphics2d class....in addition that i want to make it rotating 360 degree.:icon_neutral:

Member Avatar for hfx642
0
181
Member Avatar for Kevingon

Hi all, I have a serious problem, I made a program in java that prints reports, I made and tested the reports with one printer, but when I used the program in another printer (and another pc) all the fields are printed around 5mm down of the normal position. I …

0
85
Member Avatar for ITHope

so we have a big project and i already did the cartesianproduct portion now i'm stuck on creating a venn diagram application that should ask for the user to enter specifications like labels dancing singing , etc. and then how many for each 23 students like dancing, 10 like singing …

Member Avatar for ITHope
0
537
Member Avatar for knjava2011

I am a very new java student.I need to write a program ask the users to enter the series numbers separated by commas, with the valid input is : 23,45,90,4,5 The program should calculate and display the sume of all the numbers. I had written the code. I knew it …

Member Avatar for Taywin
0
333
Member Avatar for gahhon

[CODE] Film[] callFilms = new Film[100]; static int numberFilm = 0; [/CODE] [CODE] //Search Film Method public static void searchFilm(Film[] callFilms){ Scanner scan = new Scanner(System.in); int condition = JOptionPane.YES_OPTION; boolean check = true; do{ System.out.println(); System.out.println("Search Films"); System.out.println("============"); System.out.print("Please Key-in Item Code: "); String code = scan.nextLine(); for(int i …

Member Avatar for gahhon
0
86
Member Avatar for Labdabeta
Member Avatar for JamesCherrill
0
352
Member Avatar for DaniwebOS

Hello all, I'm using the version 6 of Eclipse JAVA development. The code below is very basic, but I'm getting warnings which is probably preventing me from running the application. Any ideas? Basically what I'm designing is a program which would input the radius and therefore it would display the …

Member Avatar for StephNicolaou
0
208
Member Avatar for StephNicolaou

Dear all, When printing a grid, for example a chess board, I was hoping it wouldn't have the same output as the console. When I want the position to be grid[x][y] = 5, 5, it will place the counter in the bottom right corner in a 5x5 grid, (5,1) instead …

Member Avatar for StephNicolaou
0
153
Member Avatar for Labdabeta
Member Avatar for Labdabeta
0
411
Member Avatar for David321

I was writing a code for class as follows: [CODE]import java.util.Scanner; public class Salary2 { public static void main(String[] args) { Scanner input=new Scanner(System.in); String name; float salary; float hours; System.out.print("What is the employees name?"); name=input.nextLine(); while (!name.equals("stop")) { System.out.printf("What is %ss salary per hour?", name); salary=input.nextFloat(); System.out.printf("How many hours …

Member Avatar for StephNicolaou
0
190
Member Avatar for anand01

Hi all, I am having confusion on polymorphism 1)Is Method Overloading considered as polymorphism? 2)Is there two types of polymorphism(run time and compile time ) available? thanks in advance

Member Avatar for anand01
0
165
Member Avatar for drjay1627

Hi, I have this requirement that I have been trying to solve for a couple of days now. I have this source DB. The objective is to extract data from this source DB and insert into a oracle table. The meta data for both tables are the same (1-1 mapping). …

Member Avatar for masijade
0
184
Member Avatar for t1suka

Hello, I've been trying to code a TrueSkill calculator using Java that fetches scores and updates them in a MySQL database. I finished coding it however it appears to have a problem while executing. This is an example of what I want the output to be like: [QUOTE]connecting to database …

Member Avatar for t1suka
0
354
Member Avatar for gahhon

film class [CODE] import java.util.Scanner; // Creating Class Members public class film { private String itemCode; private String title; private String description; private String language; private String runningTime; private String productionCompany; private String status; //eg, pending, premiering, running, written-off // No-argument Constructor: Without Parameters public film() { itemCode = ""; …

Member Avatar for gahhon
0
345
Member Avatar for vjames

Hi, I'm making a snake game and I got a timer to check everything and repaint the component. How can I achieve a 60 fps without affecting the movement of the snake. I need help to come up with an equation for the speed of the snake. Need to change …

0
253
Member Avatar for marvolo1300

Hi there, I have to create a card game as an assignment, and i am having trouble with a part of the assignment. Basically, there is an array, 'playerHand', which holds a set of integers. What i want to do is to add the elements of the array and then …

Member Avatar for marvolo1300
0
165
Member Avatar for caswimmer2011

Hey, I am now programming in a MacBook Pro and for the KeyCodes in the Robot Class, there is no set key for Command. Can I set a KeyCode to do the actions of the Command key? Thanks

Member Avatar for caswimmer2011
0
208
Member Avatar for mike2828

Hi i am new to java gui, i have trouble using color constructor. please tell me what the problem . thank you . [CODE]import java.applet.*; import java.awt.*; public class AnAppletSubclass1c extends Applet { Color c = new Color(5,25,205); public void Color(int r,int g,int b); public void init() { System.err.println("Hello from …

Member Avatar for Ezzaral
0
215
Member Avatar for cgen

I need help understanding this algorithm Design a variation of algorithm TreeSearch for performing the operation findAl(k) in an ordered dictionary implemented with a binary search tree T, and show that it runs in time O(h + s), where h is the height of T and s is the size …

Member Avatar for cgen
0
421

The End.