32,199 Topics

Member Avatar for
Member Avatar for floriza.cruz.5

Do you know how to create a java program with gui output?Please help me,it so hard to do..tnx a lot

Member Avatar for JamesCherrill
-1
96
Member Avatar for Lavanya1312

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

Member Avatar for JamesCherrill
0
329
Member Avatar for riahc3

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? …

Member Avatar for Taywin
0
259
Member Avatar for JavaDroid

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. …

Member Avatar for JavaDroid
0
1K
Member Avatar for crownedzero

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 …

Member Avatar for Taywin
0
257
Member Avatar for cody.reddoor

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 …

Member Avatar for Taywin
0
280
Member Avatar for gelmi

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

Member Avatar for JamesCherrill
0
287
Member Avatar for twazzer

[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 …

Member Avatar for woodenduck
0
3K
Member Avatar for gm.rupert

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 …

Member Avatar for NormR1
0
2K
Member Avatar for 47pirates

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 …

Member Avatar for aryan_
0
179
Member Avatar for Dizzy Noob

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 …

Member Avatar for stultuske
0
117
Member Avatar for Huck44

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 …

Member Avatar for stultuske
0
118
Member Avatar for rahul pareek

if i divide a float value from 0 then i get output:- infinity and then throws NumberFormatException why can anybody favour me.

Member Avatar for JamesCherrill
0
77
Member Avatar for softswing

Hi, How to do the custom FindBugs in Eclipse. I want to catch the specific bus from code

Member Avatar for peter_budo
0
79
Member Avatar for minnie.taylor.524

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 …

Member Avatar for Taywin
0
196
Member Avatar for amitie.boo

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

Member Avatar for neogills
0
84
Member Avatar for sk8ergirl

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 …

Member Avatar for NormR1
0
338
Member Avatar for laguardian

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 …

Member Avatar for NormR1
0
1K
Member Avatar for chuyauchi

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 …

0
63
Member Avatar for bustersox

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 …

Member Avatar for JamesCherrill
0
469
Member Avatar for RozenKristal

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 …

Member Avatar for RozenKristal
0
154
Member Avatar for Kunal Lakhani

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 …

Member Avatar for Kunal Lakhani
0
222
Member Avatar for Techboy52

//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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for NeerajRaghavendra

Is There Any Compiler like a Cross Compiler Which Can Generate Machine/Executable Code That Can Be Executable On Different OS ?

0
169
Member Avatar for london-G

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/#

Member Avatar for Majestics
0
194
Member Avatar for stlcards007

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 …

Member Avatar for JamesCherrill
0
158
Member Avatar for rahul.ch

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 …

Member Avatar for JamesCherrill
0
198
Member Avatar for sengathir

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 …

Member Avatar for JamesCherrill
0
105
Member Avatar for O_mini

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 …

Member Avatar for Taywin
0
3K
Member Avatar for JavaPrograms

How do I put the following output in a table format as shown below in the code?

Member Avatar for JavaPrograms
0
261

The End.