32,204 Topics

Member Avatar for
Member Avatar for applejax77

Here I am again! I am working on the program below that is calculating payroll but am kind of lost on how to program the reset button after the net pay has been calculated. Any and all help would be greatly appreciated. Thanks. [CODE]import java.io.*; import java.util.*; import javax.swing.*; import …

Member Avatar for applejax77
0
9K
Member Avatar for Danielhuo

I am writing a program, but I cannot find what is wrong with the code. Only need to show one MP3, or an error message if there are any missing fields or an incorrect entry for seconds. It is not storing information about previous songs; it just display the current …

Member Avatar for peter_budo
0
843
Member Avatar for gomezselva2011

Hi guys I really need help I recently purchased a Chinese phone which is giving me an error every time that i try to install a java app it says UNSUPPORTED MID LET so I was wondering whats that error and what I can do to fix my phone and …

Member Avatar for peter_budo
0
54
Member Avatar for spades0001

Hey guys! I've created this program that allows the user to get a .txt file from anywhere in the hard drive and it displays the contents in the text area. My question is: how can I edit my code so that it only allows picture files to be selected(jpg and …

Member Avatar for Ezzaral
0
139
Member Avatar for asif49

.contains seems to return true for most things, even if one or two chars match. Is there a way to make it more restrictive?

Member Avatar for asif49
0
384
Member Avatar for caffrea4

Hi, I'm new to java but have some experience with C++ can anyone help me with a basic code to display inheritance? I'v chosen a Parent class Phone and a Child class Mobile and I want to simply use the display method from my parent class on the child class. …

Member Avatar for JamesCherrill
0
95
Member Avatar for JRDJ12

[CODE]package com.abc.text; public class StringProcessing { /** * Returns the number of non-null strings in the set. * If null or a zero-length array is passed in, then zero is returned. * If a slot in the array is null, then it is ignored (not counted). */ public static int …

Member Avatar for JRDJ12
0
466
Member Avatar for HITMANOF44th

im new to java so if im doing some thing the wrong way please let me know this is the class that connects to data base and grabs all the info from colum 1 and colum 2 that part works now when i try to either make it a useable …

Member Avatar for HITMANOF44th
0
172
Member Avatar for swink11123

[CODE] import java.util.ArrayList; import java.util.Scanner; import java.io.*; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.PrintWriter; import java.io.IOException; import java.util.StringTokenizer; /** * Write a description of class Auction here. * * @Bong Suk Ing * @20/10/2011 */ public class Auction { private int displayPrice; private int increase; private int …

Member Avatar for stultuske
0
159
Member Avatar for Ashenvale

Hi guys :D.. just wondering.. when I'm using scanner this is the code I use to ignore the case "to put in the do..while statement" [CODE]} while (choice.trim().equalsIgnoreCase("Y"));[/CODE] I've been looking all over the net. what code should I use if I'm using JOption.. can anybody please help me on …

Member Avatar for thines01
0
201
Member Avatar for BurgerBob

Hi guys, I'm taking a Networking & Internet Systems module... have little experience working with java and am trying to work through an assignment... hopefully you can help! I've been given skeleton code to complete for a program that acts as a simple email client that uses TCP/IP sockets to …

0
86
Member Avatar for nchy13

i am wondering what is the problem here. here text.txt is the input file. any help will be highly appreciated. [CODE]import java.io.*; public class Main{ public static void main(String[] args) throws Exception { File f= new File("text.txt"); BufferedReader in = new BufferedReader( new FileReader(f)); String line = new String(); line …

Member Avatar for NormR1
0
104
Member Avatar for nchy13

i am quite new to java i used to code in c++ but now we have to program in java which has not been taught. i browsed net but casn't get enough information this is my first code which i managed to get from net [B]i am using GNU java …

Member Avatar for nchy13
0
404
Member Avatar for newbie-java

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example …

Member Avatar for stevanity
0
206
Member Avatar for DrFilth

Hi! I’m have been following the JAAS turrial: [url]http://download.oracle.com/javase/6/docs/technotes/guides/security/jaas/tutorials/GeneralAcnOnly.html[/url]. And the program works fine when I compile it from the command prompt in Windows. But when I try to compile and run it with eclipse it gives the error: Error: Could not find or load main class java. I think …

0
114
Member Avatar for junsugal

This is the only part of my assignment that has problem. Can anyone tell me what's wrong? I debug it, it shows me NullPointerException... please give me a hint, i urgently need this to be done. Its due today. So, I am supposed to write a method captured that will …

Member Avatar for NormR1
0
164
Member Avatar for atramposch

[CODE]public Node<E> remove (int index)[/CODE] i need to recursively implement this method. Node<E> nodes contain two fields, next (a reference to the next node in the linked list) and element (a reference to the data it contains) [CODE]public E element; public Node<E> next;[/CODE] Do not worry about the checking for …

Member Avatar for atramposch
0
2K
Member Avatar for coolsport04

I am trying to write a program that kind of resembles and etch-a-sketch. I have the basis for it. I am having two problems: 1. When I draw a shape in the default black color, when I switch the color it changes the color of what I had previously drawn. …

Member Avatar for Ezzaral
0
211
Member Avatar for dennysimon

Hello all Does Caret Event only for one component only ? I tried to find example for more than one TextField which added with CaretListener,but cannot find one. Anybody know website or has example like I need ? I need to know how to detect which component arise the CaretEvent …

Member Avatar for dennysimon
0
132
Member Avatar for kiaski

A number is called a proper divisor of N if M < N and M divides N. A positive integer is called perfect if it is the sum of its positive proper divisors. For example, the positive proper divisors of 28 are 1, 2, 4, 7, and 14 and 1+2+4+7+14=28. …

Member Avatar for Ezzaral
0
256
Member Avatar for Muna Oman

Hello folk i am a new member n i need Ur help to do my course project for developing Sudoku game i already have my codes but i need a code for generating random numbers in the grid this is basically my code [code]import javax.swing.*; import java.awt.*; import java.util.*; /* …

Member Avatar for NormR1
0
654
Member Avatar for skylinepkr

I have an assignment to make a paint program using java but i am kind of stuck at a roadblock. I have a pencil tool and i used the mouseDragged, mousePressed, and mouseReleased methods of mouse(motion)listener to draw my path using general paths (lineTo and moveTo). My question is, is …

Member Avatar for Ezzaral
0
114
Member Avatar for BDan

I am a fairly new programmer still in school, and trying to have my program write the selected information to a designated file. I keep getting an error message on my file OutputStream. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.text.*; class ExampleJComboBoxSample extends JFrame implements …

Member Avatar for Ezzaral
0
167
Member Avatar for maurya10
Member Avatar for JRDJ12

Can someone show me what bubble-sorting an int[] of { 5, 4, 3, 2, 1 } looks like? I have to place it inside [CODE]public class SortIntArray { // this method needs your code to be added to work public static void sort(int[] list) {[/CODE] with no calls to any …

Member Avatar for NormR1
0
260
Member Avatar for nchy13

can somebody help me out by providing link to the stuff related to buffer reader in java to read a trace file and store it in array of string.

Member Avatar for Ezzaral
0
359
Member Avatar for Mojtabarahimi

Hi Actually i try to do this programming but i have some problems. I'll become thank you if help me to fix it. It is a simple Ferry Ticketing System with below conditions : FERRY TICKETING SYSTEM A small ferry company has just purchased a computer for its new automated …

Member Avatar for NormR1
0
2K
Member Avatar for sidd1994

hi people i am new to this site ... i needed a bit of help i have got an home work to create this :the use will enter 6 random numbers and the computer will print the series :input: 10,5,6,4,3,6 output: 10 5 6 4 3 6 5 1 2 …

Member Avatar for sidd1994
0
99
Member Avatar for Catobion

Hello, I am new, and this question may seem stupid but I'm kinda lost.. i didn't attend the first classes because I was ill. Can someone help me to construct a pseudo-code for a rectangle like this: ******** * * * * ******** (it doesnt look right - it should …

Member Avatar for stultuske
0
105
Member Avatar for newbie-java

I have the user enter a string e.g. subject of book using a scanner then a for loop, to print out all the books with the same subject to what the user entered. But I'm having a problem in that it will only print out the first occurrence. For example …

Member Avatar for stultuske
0
242

The End.