32,204 Topics
| |
SOMETHING IS WRONG WITH MY CODE, IT GETS COMPILED BUT ONLY PROBLEM IS WHEN I INPUT THE NUMBERS THE OUTPUT COMES AS "Area@9664a1" ! // Implement a class Area which has three attributes length, breadth and Area. use attributes constructor to initilize length and breath. implement a method calcArea to … | |
Hi, I am trying to implement an applet. The idea is to create the applet, then connect places where I single-click with the mouse with black lines until we give a double-click. With a double-click I should clear the applet. To clear the applet I am trying to set the … | |
Hi all, I am trying to execute a windows command from within my java program, but I can't get it to execute the DOS command. Here's my code: [code=java] try { Process p = Runtime.getRuntime().exec("cmd.exe /C cls"); } catch (IOException e) { // catch exception } [/code] But, the code … | |
I'm new to programming and i'm way out in left field on this one... I'm trying to write a program that takes takes numerical grade inputs and tells you what the letter grade is. The program must keep running until the user hits 'E' or 'e'. Here's my problem: with … | |
Hello DaniWeb. Just brushing up on some Java and got a quick syntax question. What does the this code do? [CODE]LoginForm formBean = (LoginForm)form;[/CODE] Now I know that a formBean object of type LoginForm is being created but I dont know what its being declared with. Whats happening on the … | |
Hi I want to create a simple bi-directional variable binding in java. assume having a String and a jTextField [CODE=java] String stringVariable; JTextField jTextField; [/CODE] I bound the jTextField.text property to the stringVariable using this code : [CODE=java] org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${stringVariable}"), jTextField, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); bindingGroup.bind(); [/CODE] any … | |
hi, please tell me how can i open a dynamic web project in netbeans and then open a JSP and Servlet files. Thanks | |
[code=java] import java.util.*; public class factorial { public static void main(String[]args) { int m,f,n; System.out.println("Factorial Solver"); System.out.println("Enter a number"); Scanner sc = new Scanner(System.in); n = sc.nextInt(); m = 1; f = 1; f = f * m; while (m != n) { m = m + 1; } f … | |
I want to create a Jtree in Java Desktop Application.I know how to create a dyanamic Jtree in normal java application.I tried google but I didnt got satisfied answer.please help me as soon as possible. Also the Tree is of "Name of tables in database" and with child node as … | |
Hey, I'm a student wanting help on how to write a program in netbeans.. I have no idea how to work this website so this question may be in the wrong place but.. here goes: so i need to write a program that outputs a quote one letter at a … | |
create a class (adressbookentry)that contains adress book entry using java code... | |
Well, the title might be very complicated if you think of what I'm actually trying to do. Well I have a typical 'the-sky-is-falling' game and as in most of these type of games you have to catch apples, and I maximum allows 3 at a time, and you get + … | |
Hai Friends, Iam developing casino and spinning game in J2me with grphics, can any one suggest me what tool i have to use how to use? | |
When I try running this code in netbeans, I get a window which says that the main class wasn't found in PerfectNumbers. And underneath there's a select main class, which endlessly stays at : Initializing view, please wait... [CODE]public class PerfectNumbers { int nbToFound; public PerfectNumbers(int nb) { nbToFound = … | |
Can someone tell me what's wrong with my program? import java.util.Scanner; public class TotalSales { public void getNumbers() { Scanner input = new Scanner( System.in ); double numbers[][] = new double[5][5]; int count = 0; // number of uniques read int x = 0; int y = 0; int productNum … | |
Ok, I've got this code, it says that there are no main classes and that [I]public class Amicable[/I]; class Amicable is public, should be declared in a file named Amicable.java, but the file name is Amicable... Any help would greatly help me, since I have same prob. with another file>_> … | |
I'm using documentation on sun.com to try and learn Java. I was trying a simple Notepad type program but cannot get the menus to display. I'm receiving no errors and cannot figure out what I've done wrong and/or left out. [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class NotepadInJava … | |
Its been awhile since I have toyed around with java, so I'm a bit rusty. But decided to mess with it today. I have a jPanel that I will be adding objects to, but I want to add the in a new row each time a button is clicked. Anyways … | |
I need to build a program - hotel, which has from 1 to XXX rooms. It is ok, when I have only the: [CODE=JAVA]private static int[] array_of_rooms; <... CLASS CONSTRUCTOR ...> array_of_rooms = new int[size]; // Size is defined size, of rooms in the hotel. // Fill default room status … | |
I want to trigger an event when ever an item is changed in a combo box...how can i do it? what is the listener & action? thnkx in advance..... | |
How to create n threads for manipulating m files ('n' is very less compared to file 'm') . I have written file manipulation program in void run and reading in main prog. declaring file name in global variable buffer I should use file locking . Currently i have written program … | |
hi friends... i have a doubt in insert query... how to write the insert query to insert the value from textfield into database table....... | |
This is really frustrating. Whenever I run this, a blank window frame appears The components only appear when I click the edge of the frame. Please check if I did something wrong: [CODE] import javax.swing.*; import java.awt.*; /** * */ public class FFGen{ public void First(){ /** * @param args … | |
hi pple.... i am doin a mini proj and can anyone please help me the java code of the ad-hoc on distance vector routing algorithm..... | |
which of the following is correct 1)block can have multiple records 2)records can have multiple blocks 3)one record per block 4)both are independent | |
First, I want to thank you for helping if you did, if not, thanks for checking it anyway. Second, I have been working on this for awhile, but I only am getting baby steps towards my goal. I get this far and I get compile correctly, but when I run … | |
sir, i have got to present a seminar on java the topic being java and virus , my sir has asked me to create a program using java for virus can u please help me. i am a second year student for bachelor if computer applications. your faithfully priya ravi | |
how to convert jpeg color image to gray by using formula 0.3 * red + 0.6 * green + 0.1 *blue | |
To begin, we were asked to make a TREE... It says that we should traverse the left subtree of the ROOT/NODE in postorder and then make a copy of it... Next is to traverse the right subtree of the ROOT/NODE in postorder and then make a copy of it... Lastly, … | |
Iam using JXTaskPane, and added few taskpanes, to a taskpanecontainer, and inturn added it to a panel. I want to apply action listeners to the taskpane selected. But i see that there is no methos like getSelectedComponent for a taskpane, which exists for a tabbed pane. How i can achieve … |
The End.