32,199 Topics
| |
Do you know how to create a java program with gui output?Please help me,it so hard to do..tnx a lot | |
Hi, I'm new to junit. I want to create test cases for if condition,loops. do we have any guidelines to write test cases for if conditions.Can any1 explain with an example. Thanks in advance. Lavanya | |
Hello Im using org.apache.commons.net's FTP object to make FTP transfers. The problem is that when the IP is down (example, the PC is turned off) a exception saying "No route to host" pops up and not only delays my program but gives a nasty error. How can I avoid this? … | |
Hey, new to java, but trying to build a text-based adventure game similar in gameplay style to the original Zork series. http://pot.home.xs4all.nl/infocom/zork1.html This is not homework. It started as a way to practice what i've learned, but now I am determined to make this work with the simplest code possible. … | |
So I'm parsing a CSV and trying to create a new object from each record. Using BufferedReader != null runs thru the file just fine. Now I use string.split method to put each line into an array. Ideas on how to use the values in the array to create the … | |
public void inOrderTraversal(TreeNode node) { if(node == null) { return; } inOrderTraversal(node.getLeft()); System.out.print(node.getKey() + " "); inOrderTraversal(node.getRight()); } I wrote this code for going through a binary search tree and printing out the items in order from low to high. it works just fine but i need to get it … | |
Good Day i just wanted to ask what does (x1, y1, x2, y2) in g.drawLine in creating a line in java applet.. thanks in advance | |
[CODE]public class MinDif { public static void main(String[] args) { EasyReader keyboard = new EasyReader(); EasyWriter screen = new EasyWriter(); //Create an array to the length of the specified entry int numItems=keyboard.readInt("Enter the length of the array: "); String[] myArray = new String[numItems]; // Read in the contents of the … | |
can anyone convert this code to GUI?? I really don't know where to put the GUI codes in it.. :( please help.. :( import java.util.Scanner; //main class public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the size of the array: "); int … | |
I've client and server on my wireless LAN , I can easily ping from client to server any time n, similarly i can ping from server to client for one time and after the application is run. I cannot ping again to the client from server. Why this is happening … | |
Hello, I am struggling to find out what im doing wrong in this code. I am new to programming and i am stuck. Ive altered my original code after finding great help online but i am stuck...again. any help will be greatly appreciated. public class CreateDelivery { public static void … | |
What are the constraints on the argument values of these two methods, and explain what the method does. int power( int base, int exponent) { if (exponent == 0) return 1; else return (base * power(base, exponent -1)); } int factorial (int n) { if (n > 0) return (n … | |
if i divide a float value from 0 then i get output:- infinity and then throws NumberFormatException why can anybody favour me. | |
Hi, How to do the custom FindBugs in Eclipse. I want to catch the specific bus from code | |
The problem I am having is in Juno Eclipse. "school.nextString" is being underlined in red to highlight a critical error. The basic purpose of this program is to ask the user a series of simple questions with if loops to determine the output given. Eclipse is handy and gives me … | |
i wanted to program that is like an musical composition !!!i mean like a musical composer with buttons where each button when pressed gives a different tumes or sounds !! can anyone do me a project on this !! plzz | |
I'm creating this in java 4 buttons and output area When the user click button 1 it will show in the output the following 564(0, 0) // 564 is id number and 0 is location in the x axis and 0 is in the y axis 564(2, 6) //using v.move … | |
Hey guys, I'm trying to make this program that allows a person to set the size of an array to any value they choose. Then, the program will ask the user to input n values to be stored in the array at the corresponding index. Then the program modifies each … | |
My Android preference (menu) is not opening a new activity. When I click the 'menu' button on the emulator, I can see my 'Setting' option. However, when I click the 'Setting', the setting page is not showing. There is no error and warning. Thank you for your time. I am … | |
I am having some difficulties getting this code to work properly. I cannot figure out how to correctly return all of my methods because I have the println listed inside the methods. So when I run my program, I get the println's , plus the return value. But I don't … | |
So I have a question about using methods. Alright, let say I want to create a system of atm and bank. I create a class account that has all related attributes such as acc # and balance and blah. Then I create an ATM class that contain methods such as … | |
I collected the data off the form and placed it in a bean class, DataBean. JRBeanCollectionDataSource constructor takes Collection as parameter, so i should convert the bean data into some kind of collection, like list, and then pass it into JRBeanCollectionDataSource and pass its instance to JasperManager.fillReport method. In iReport … | |
//Hey I need some help //Write a JAVA application that displays a traffic light (three circles inside a rectangle with //red, yellow, and green color) and three buttons with red, yellow and green titles. The //application should turn the appropriate light on when the appropriate button is clicked. Two //lights … | |
Is There Any Compiler like a Cross Compiler Which Can Generate Machine/Executable Code That Can Be Executable On Different OS ? | |
Hello, I have my JFrame and I want to ve a sliding menu on the side that will not be visible until someone click on a button. I have divided my JFrame into two containers but don't know how to proceed. Something a bit similar to this: http://www.andrewsellick.com/examples/sliding-side-bar/# | |
I need help with the if else statement below. I am trying to use branching to determine and drawString to find the longest lines between the points. Everything I try with the branching method seems to give me errors so I have no idea what to do and it is … | |
Given: Sour extends Blue extends Pan `Pan p4 = new Sour();` Then set of 6 new statements given and asked to choose which ones will compile. They are: 1. `Pan p5 = p4;` 2. `Pan p6 = (Blue)p4;` 3. `Blue b2 = (Blue)b4;` 4. `Blue b3 = (Sour)p4;` 5. `Sour … | |
hi, when i try to multiply the double value with 100, i got inconsistent o/ps.. here the codes... Case1:- double d=15.025d; System.out.println("d="+(d*100)); o/p:-d=1502.5 Case 2:- double d=16.025d; System.out.println("d="+(d*100)); o/p:- d=1602.4999999999998 and this issue to 17.025,18.025,19.025 & 20.025 also. it suppose to be d=1602.5 right? why these particular o/p and how … | |
Hello, thanks for taking the time to read this. I'm working on (what should be) a simple, simple java program, I am very new to java so please bear with me. I'm writing code with a method that takes an array of int values and determines if all the numbers … | |
How do I put the following output in a table format as shown below in the code? |
The End.