32,204 Topics
| |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, I want to Map a single key to array of values. Is that possible? | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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]; … | |
the random character should be uppercase letter A to Z is from 65 to 90 in the asii table what is the equation....? | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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)) … |
The End.