32,204 Topics

Member Avatar for
Member Avatar for Joey_Brown

Hello Lets say I have these two classes; [CODE] public class BFF{ private String name; private String surname; private Object friendships; }[/CODE] [CODE] public class BFFG<T>{ private String name; private String surname; private T friendships; }[/CODE] Is it possible to create a generic method that could create a Set of …

Member Avatar for JamesCherrill
0
99
Member Avatar for swink11123

i'm so frustrated about my coding :( now i cant even get it right :( assignment gonna due this coming week T^T and i really need help i hope you guys can really solve my problem for me T^T so here is what i did so far >< [code] import …

Member Avatar for jwenting
0
211
Member Avatar for anand01

Hi all, When I run use to add second element in the tree set it shows java.lang.ClassCastException: could any one explain me why [CODE] import java.util.TreeSet; public class Venus { public String str; public static void main(String[] args) { Venus a =new Venus(); Venus b= new Venus(); a.str="obj1"; b.str="obj2"; TreeSet<Venus> …

Member Avatar for ~s.o.s~
0
137
Member Avatar for mary786

The Question is : Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set …

Member Avatar for NormR1
0
201
Member Avatar for greatcornholio

Hi all, im doing a program using java and sql, and im trying to set a textbox with a value stored in a database. thing is: i have a combo with airlines, and each airline has a cost for each seat. so what im trying to do is get this …

Member Avatar for stevanity
0
170
Member Avatar for programing

program enter element and if num is already exist give message enter other number no duplicate my code give me alwayes else condition [CODE]/** * @(#)Enter.java * * * @author * @version 1.00 2011/11/18 */ import java.util.Scanner; public class Enter { public static void main(String []args){ Scanner input=new Scanner(System.in); int …

Member Avatar for stevanity
0
91
Member Avatar for softDeveloper

Hi all, I'm reading to a jtextpane a word document. Everything is fine except for this character \u0169 ( a tilde over an u).. Any suggestions? Thanks

Member Avatar for stevanity
0
72
Member Avatar for rayden150

Im using netbeans gui editor and im trying to add a Jfreechart that is itself in a internal frame, and this internal frame I am wanting to add it to a panel, as you can see in this image: [url]http://www.flickr.com/photos/63259070@N06/6370734167/[/url] The internal frame doesn't even show up on the panel …

Member Avatar for mKorbel
0
355
Member Avatar for autorunman22

Hello guys! Ive finished my last project lately about a program that has a trial version. Now, i want to update it, im thinking of creating a database from a website, then my program reads it (say, [url]www.serials.com/getserial.php?id=[/url][user id inputted]),then my program checks if the serial inputted is original, if …

Member Avatar for autorunman22
0
120
Member Avatar for vaironl

I have a recipe class which has a constructor, the constructor takes in 7 parameters = RecipeName,AuthorName,Ingredients,Ingredientamounts,rating,servingSize,Instructions I'm trying to set those values using the scanner, but I don't know how to make it work since I have the scanner method inside of the Recipe class. So it looks kind …

Member Avatar for vaironl
0
125
Member Avatar for yazz110

Hi, I have a problem and forgive me if this sounds like a stupid question but I'm not really a good programmer. Ok, this is my problem. Say you have a string and you would like to pull out integers from the string what do you do? Example: String question …

Member Avatar for stultuske
0
158
Member Avatar for javausers
Member Avatar for javausers
0
136
Member Avatar for 11349

Hi Folks, Hope your all well, Im Kind of new to JSP and so far I think I'm doing ok! However I'm using some of it for my dissertation which is creating an ITAM (IT Asset Management System). Im looking for some advice on drop down boxes and populating data, …

0
40
Member Avatar for Gen.Asura

Hi basically I need help java and my program is an calculator which must be able to calculate arbitrary expressions like for example (5.0+8.1)*(2.0). My program works fine it does basic things like calling upon classes etc it's just I don't know how to do the arbitrary expressions. My calculator …

Member Avatar for Gen.Asura
0
829
Member Avatar for Ashenvale

Hi! I'm trying to create a program that will allow the user to input 5 numbers and will print the largest and smallest number. I tried doing it and this is what I came up.. The thing is, after the program executes its purpose i want to add a statement …

Member Avatar for Ashenvale
0
168
Member Avatar for KSBeyaz

Hey guys i m trying to make hangman game as java application here is a simple run how it should be. [url]http://e.atilim.edu.tr/mod/resource/view.php?id=5240[/url] i m trying to put JLabels in order when player click correct buttons. firstly i added JFrames at first then i did setEnabled(false) them after button is clicked …

Member Avatar for KSBeyaz
0
240
Member Avatar for xiangzhuang

Hey guys, so this is what happened. I'm stuck on this project on the second part, which is the top right quadrant. Its not showing the graphics at its specified quadrant which is the top right. Its supposed to have randomized sized red blocks that fills the quadrant. Can you …

Member Avatar for hfx642
0
397
Member Avatar for LondonJava

I want to attach User Instructions to a Java application, and allow the user to open it from the help menuitem. I'm not very familiar with classpath variables. If I use an absolute path name everything is fine, such as File pdfFile = new File("C:/Program Files/MyProgram/UserGuide.pdf"); But I want to …

Member Avatar for hfx642
0
502
Member Avatar for km2011

i have problem about the output in this code, my output so only the index 0. how can i fix this. [code] public class d_2D { static double[][] d =new double[6][4]; static double[][] e= {{}, {0.0,0.6,0.0,0.0}, {0.0,0.2,0.5,0.1}, {0.0,0.2,0.5,0.4}, {0.0,0.2,0.5,0.7}, {0.0,0.0,0.0,0.9}}; static double[] avg= new double[4]; static double[] sum= new double[4]; …

Member Avatar for km2011
0
172
Member Avatar for kelvin924

the random character should be uppercase letter A to Z is from 65 to 90 in the asii table what is the equation....?

Member Avatar for stevanity
0
219
Member Avatar for Unsated

Hello everyone and thanks in advance for helping me. I'm a 1st year java student in my first semester of college. Its comming towards the end of the semester and finals are starting up.. well my problem is that my java teacher decided to give us 2 projects to work …

Member Avatar for Unsated
0
365
Member Avatar for Jessurider

can anyone tell how to bring Bitmap class in java just like we do that in C#................ i've got link regarding the Bitmap class in java... but i does'nt know how to bring that in java [URL="http://jwx.sourceforge.net/api/wx/Bitmap.html"]http://jwx.sourceforge.net/api/wx/Bitmap.html[/URL]

Member Avatar for Jessurider
0
210
Member Avatar for jhamill

So I wrote up a simple voting GUI, but I havent been able to figure out how to get it to display the current leader or how many votes they have. It displays the total number of votes correctly, however. Heres my code [CODE]import java.awt.*; import java.util.*; import java.awt.event.*; import …

Member Avatar for harinath_2007
0
192
Member Avatar for mike2828

i am getting an error : java:10: error: AniWorld is not abstract and does not override abstract method mouseMoved(MouseEvent) in MouseMotionListener public class AniWorld extends Applet implements MouseMotionListener, MouseListener please help [CODE]import java.awt.*; import java.lang.*; import java.applet.*; import java.net.*; import java.net.MalformedURLException; import java.applet.Applet.*; import java.io.IOException; import java.awt.event.*; public class AniWorld …

Member Avatar for mike2828
0
106
Member Avatar for sandman64

What i need it to is write a GUI program that has one text field, one button, and one text area. The user can enter data into the text field, and then click the button. When the button is clicked, the program records the value in the text field to …

Member Avatar for Aviras
0
2K
Member Avatar for asif49

I have to do this project in which several employees need to be added to the system. The system admin should be able to allocate jobs that each of those employees will be doing after verifying whether that job is already attached to the employee or not and whether that …

Member Avatar for asif49
0
158
Member Avatar for WigglesMcMuffin

I'm trying to create a program that'll read a list from an external file, and generate an arrayList with the object representation of the list. Basically, the list contains names, and prices, which will be read in, and used to create instances of my "book" class which are supposed to …

Member Avatar for WigglesMcMuffin
0
254
Member Avatar for lbgladson

I am trying to use a combo box to change the background color. I have the following code but it is not working correctly. The combo box is there with the three choices but the choices are not changing the color of the background. [code] import java.awt.BorderLayout; import java.awt.Color; import …

Member Avatar for Ezzaral
0
103
Member Avatar for thehorseman123

Hey there, quick question is there anyway i can set the order of nodes, that have already been saved in a Jtree. Say if i had an array of pictures, which i can flick through. Then using a Jtree i can change the order of the pictures. If so how …

0
36
Member Avatar for branflake

I'm trying to figure out how to use JOptionPane to determine which deduction someone will receive. S - Single and M - Married. I just need to use the first letter of the input though. [CODE] public double calcinsDeduct() { double insDeduct; if (status.startsWith(s)) insDeduct = 50.00; else if (status.startsWith(m)) …

Member Avatar for stultuske
0
11K

The End.