Ignoring the period in a sentence

1419 byte By blyss808a at 2007-9-30 23:43:08
Hello, I am trying to create a code segment that goes through a sentence (input) word by word and displays all words which have an even number of letters and ignores the words with an odd number of letters. I have created a code that is able to do that. But, the only problem is that the last ...

manifest-only jars

619 byte By cras69a at 2007-9-30 23:43:32
Hi there,I'm in the process of compiling a Third-Party jar file. All the file is going to contain is class-path references to a whole bunch of jar files. i.e. there are no .class files in the JAR, only a class-path reference in the manifest file:The manifest file contains this:Class-Path: ...

What is the exact reason behind this

360 byte By lalith123a at 2007-9-30 23:44:07
Hi,Can some one say why the output of the following program results251.67000000000002.Mathematically above is wrong. What is the meaning fo the last digit 2;Mathematically it should result 251.67double y= 258.67;double z= 7.00;System.out.println("value of y-z is "+(y-z)) Waiting for a early ...

Hi! Last question before xmas! Promise!

520 byte By JessicaSimpsona at 2007-9-30 23:44:18
Hi! I'm like, wondering what the best design is when making an update method? It's totally working but my teacher is going to mark us on design. My question is, if I've like, got an update method that will throw an exception if something gets totally messed up, should I still return a ...

event handlers

976 byte By Alan_Shearera at 2007-9-30 23:44:34
Hi guys having problems with my event handler. i have my GUI and when i click on File -> Exit i want my program to close when i click on exit. I have the following code and wondering if you can see any problems with it.Your help would be ...

Read LineTo x, y coordinate for GeneralPath?

477 byte By dr1234a at 2007-9-30 23:44:50
I have a arrow, created with GeneralPath, how can i read every lineTo x,y coordinate for the arrow below when i mousepress a arrow?GeneralPath arrow = new GeneralPath();arrow.moveTo(0, 100);arrow.lineTo(20, 10);arrow.lineTo(20, 0);arrow.lineTo(40, 20);arrow.lineTo(20, 40);arrow.lineTo(20, ...

MathML Editor

171 byte By radishcarrot0_0a at 2007-9-30 23:45:41
Hi,Can anyone give me a rough idea as to how I can start implementing a MathML editor using Java Swing embedding it within a Java Applet?cheers to all

Database and design question

1389 byte By RageMatrix36a at 2007-9-30 23:46:46
Hi there all, I've sort of asked this question before in regards to an OutOfMemoryError, but I guess I really don't know how to proceed. It didn't really matter so much before, as it was just an automated command line utility that you just fired off. But now I've improved the design a ...

initial values to instance & class variable

416 byte By erez2000ila at 2007-9-30 23:46:48
I read in the book that instance & class variable definitions are given an initial value depending on the type of information they hold:Numeric variable - 0Characters - '\0'Boolean - falseObjects - nullBut when I try to compile a class without giving explict value to the variable I get ...

Searching and Retrieving info from an individual website

540 byte By Slave2Sixa at 2007-9-30 23:46:59
There is a website called gospel.com that allows users to search for and read from a variety of translations of the Bible. I want to create a program that will take the particular Scriptures for the day as outlined in the Daily Office of Prayer section of the Book of Common Prayer and display ...

resizing JButtons

6556 byte By Cancel_Mana at 2007-9-30 23:47:42
Here's the dilema- I'm trying to make an applet with a lot of buttons in each row, but I don't want the applet to stretch the width of the screen. Some of the buttons don't have anything on them but a "-" or a single digit number. How can I properly size these buttons down so that they ...

Closing a window in a multi window program

905 byte By drpepper244a at 2007-9-30 23:47:43
hi,newbieI have a program that has multipule windows in it, the main window is always on the screen which is cool.I can open other windows as they are just other classes but i do not know how to close them without closing the program. Below is some code i tried but with no result.cancelList = ...

Even a simple program is not working ?

864 byte By plomona at 2007-9-30 23:48:10
The program is :import java.lang.*;public class Customer{String custname;String custID;public Customer(){custname = "Bob";custID = "S20010";}public void displaydetails(){System.out.println("Customer name is " + custname);System.out.println("Customer ID is " + custID);}public static void ...

"Save" in applet

207 byte By BhushanDamlea at 2007-9-30 23:48:44
The default menu of an Applet (when it loads) has a Save option.It saves the Applet in a .ser format.Can this .ser format file be used anyway? It can not be opened with appletviewer.exe.

java.lang.NoClassDefFoundError....... help Please

191 byte By mohammad.ashrafia at 2007-9-30 23:48:49
hi everyone when i use readline()method in my program this errorappear java.lang.NoClassDefFoundErrorwhy it can not found the class definition i use jdk 5.0

Chat room Plug-in

220 byte By jimva at 2007-9-30 23:49:02
I'be been told I need a Java plug-in to paticipate in Cabela's "Live Chat". Is this true? What is a plug-in, how do I get it, and how does it work?Thanxs to anyone.PS> I have Windows XP Home Ed.

Changing variables across packages

958 byte By luke_oa at 2007-9-30 23:49:16
I wonder if anyone can help. I will try my best to explain, but it is a large project I am working as part of, and I may not get every bit of information across, so if you need more, just ask.Anyway, the problem is that I cannot get my variables to change.... Let me explain.I have a class, ...

Storing From Combo Boxes/Radio Buttons

4512 byte By rageboy82a at 2007-9-30 23:49:20
hi, im working on the following program, its a simple questionnaire. however im not 100% sure how to store the choices from the comboboxes. for example if a user selects the age group "10-20" then clicks submit, how do i get it to store into the correct age group? ? ? any advice would be ...

Timer resolution

440 byte By pao_lighta at 2007-9-30 23:49:29
Hi,can somebody give me some information on the resolution of the timer implementer by the Timer class in java? I need to perform some computation every 20 ms and I wondering if the method scheduleAtFixedRate can give me a good timing... Is it the same time that I get using ...

need help with Recursion

2774 byte By cblake80a at 2007-9-30 23:49:33
We are learning how to use recursion in class and the assignment we are suppose to print out the subsets of a given word.ex. "rum"should print out'rum", "ru", "rm", "r", "um", "u", "m" but i keep getting a string error out of bounds exception, which i know what it is, but i don't think that i ...

Help With Bubble Sort and Sieve Of Eratosthenes

2395 byte By MSmartiea at 2007-9-30 23:49:34
I'm struggling with a task I have to do. I have to write a program which reads 100 integers from a file and store them in an array. I also have to sort these integers using a bubble sort and implement the sieve of Erastosthenes to place all the prime numbers in an array list.Here is the code I ...

Isn't there a NetBeans forum?

37 byte By jeffnca at 2007-9-30 23:49:35
Isn't there a NetBeans forum?

problem with array of TextFields

779 byte By sruj_pasa at 2007-9-30 23:49:38
Hi ,I have one Panel where i add array of TextFields and i added them but they are not getting added could anybody check my code and help me .., here is my code.,TextField[] textField7;TextField[] textField8;setLayout(new GridLayout(m,2));ScrollPane sp = new ScrollPane ...

Dileama: Does my server accept more than one client

221 byte By scor_satyaa at 2007-9-30 23:49:43
i created a simple server and a client app. but i am unable resolve wether the server is going to accept more than single client. if not, then should i implement threads to accept more than one client on my server.

a loop to exit if negative number is entered....

117 byte By kev269a at 2007-9-30 23:49:46
Hi,How can i write a loop, so that if a negative number is entered, the program will exit?Thanks

Method to count characters without counting spaces

4146 byte By Stumpeda at 2007-9-30 23:49:47
I need help writing a method in the below code that will return the total number of characters in the full name without including spaces. I'm not sure if I should use a variable.length() or how to go about this.public class Name {private String firstName;private String middleName;private ...

Tables updating

2894 byte By drpepper244a at 2007-9-30 23:49:50
hinewbieI have an array of objects which i wish to display in a table, i have done the code for this which is shown below, however, when i load up the panel with the table on it does what it's supposed to do the first time round however if i add or remove from the array of objects the table ...

How do I get today's date in the format YYYY-MM-DD?

57 byte By katt_bjorna at 2007-9-30 23:49:56
Can anyone help me with this?Thanks // Elle

End a do/while loop

4277 byte By Stumpeda at 2007-9-30 23:49:58
Is this the right way to write the end of a do/while loop when I want the loop to end if a user enters a phrase "quit"?while (!phrase.equals("quit"));See comlete code below.In testing this i typed in "quit" and the loop still continued to print out the SOP's public class Count {public static ...

Panels Panels Panels

4688 byte By tim_green0a at 2007-9-30 23:50:10
Hi i have been trying to get the below code to work but it won't. I want the program to have changable panels. I have a menu bar which has a panel menu. When panel 1 is clicked i want it to display panela and when panel2 panelb etc. i have got panel1 to work but when i click panel2 then panela ...

I need help making a Quad Formula algorithm?

951 byte By punchouta at 2007-9-30 23:50:14
I thought I had it worked out, but the equation x^2 + 2x + 4 is giving me problems. That means A=1, B=2, C=4 - I cant get it to work out all the wayThis needs to compute 2 roots of a quadratic equation. The user enters random coefficiants in, and everytime I think that I fixed it, I notice that ...

Just getting started -- PC or Mac?

1182 byte By Tokenda at 2007-9-30 23:50:23
I want to develop an open-software Web app that people will want to download, play with, and enhance. The app will require the following:* Heavy-duty math (2-D & 3-D geometry, trig, calculus, probability & stats.) * 3-D graphical display * Vector-based animations (fast, compact) * Music ...

Loger File

504 byte By joekdoea at 2007-9-30 23:50:24
I realize that you can specify the Logger file by coding "FileHandler handler = new FileHandler("my.log");" but if you don't code that where do the logger messages get written to?If I just code "Logger logger = Logger.getLogger("global");" where does the logger file get written to when I do a ...

Two problems.. 1) getting correct file 2) changing to jlabel..

13600 byte By LeKtriXa at 2007-9-30 23:50:27
Hello guys,Here is my first problem that I need assistance with.. I have a RatRace class that uses JFileChooser to allow the user to select a .txt file..I have another class called Map that is supposed to take the .txt file, read it into a 2D array and display its contents.. both programs work ...

byte[] to long

915 byte By Ewan_Sinclaira at 2007-9-30 23:50:38
I'm writing an app that needs to deliver data to different places based on source and destination IP addresses. I was thinking that I could do this by stuffing the bits of both addresses into a long (source followed by destination) and then making a binary tree out of them.Assuming I can get ...

javamail size of attached file (mail sent but not received)

367 byte By ahousnia at 2007-9-30 23:51:09
Hi, I am using javamail, I am doing some test.I can send file using java mail. After that, I check that the file has been received by destination. Untill that javamail is working fine.But when I send a file with size > 1M, the mail is sent without problem but the mail is not received by ...

Compile Error "." expected on import Coin;

738 byte By DrAllsoppa at 2007-9-30 23:51:10
Hi.Very new to this so I hope I have the right forum.I looked through about 30 pages before posting but didn't find a similar problem.I have a program that starts :import Coin;public class CountFlips{// // Flips a coin multiple times and counts the // number of heads and tails that result// ...

COMPILES OK! BUT WHY DOESN'T IT RUN?

4678 byte By Ritza at 2007-9-30 23:51:17
Hello,I would really really appreciate some assistance on this piece of code. The following program is a simple Bank Account program which allows a user to view either their Savings or Current account details and displays the details. This piece of code compiles fine, but when I try and run it ...

It compiles and runs but it calculates wrong

2287 byte By 1kenoa at 2007-9-30 23:51:25
here's my class//instance variablesprivate int id;private double balance;private double annualInterestRate;//Default constructorpublic Account(){this(1, 1000.00,9.0);}//constructor with specified id, balance and annual interest ratepublic Account(int id, double balance, double ...

Considering Java for App Rewrite

1110 byte By mishkana at 2007-9-30 23:51:47
I have an application that is currently written in Delphi 3, using an Oracle 8i database backend. We are about to shrink-wrap that version, call it a prototype, and do a fresh analysis and re-write.We have two major goals: 1) Make the app a thin-client, and2) Preserve all the functionality ...

Java and French OS

260 byte By DevilDawga at 2007-9-30 23:51:51
I have been struggling with a problem. We have Java script "shortcuts" on our company's web page. We have recently deployed Windows French version. Now some of the shortcuts don't work. JRE 142_02 is loaded on the image. Any help would be appreciated.

Processing arguments from the command line

2876 byte By cblake80a at 2007-9-30 23:51:52
I have an assignment that i am suppose to write a program that seaches all the files on the command line and prints out all lines containing the keyword.Ex.java Find Buff report.txt address.txt Homework.javait should printreport.txt: Buffet style lunch will be available at theaddress.txt: ...

Why is it ln and not nl?

285 byte By fl0wa at 2007-9-30 23:51:59
Heh, it isn't a problem, but I'm curious.println() adds a new line att the end, but ln stands for line (I belive).why not nl for newline, since it does add a new line?printline and print is the same (namewise..).Or does ln stand for something else?

what program to use

608 byte By TheSniipea at 2007-9-30 23:52:09
2 questions;I use JSTL and am using dreamweaver to make my pages, but it doesn't understand JSTL. I was wondering if I can get an add on for dreamweaver or is there a good editor out there for JSP's using the JSTL?Also if I'm using JSTL and using the <sql:query> shouldn't it be that ...

Problem with Sun's Swing Example

2682 byte By jgetta at 2007-9-30 23:52:14
Hello,I'm getting an error when I try to run the Swing example. I cut and pasted this code :import javax.swing.*;import java.awt.*;public class HelloWorldSwing {/*** Create the GUI and show it. For thread safety,* this method should be invoked from the* event-dispatching thread.*/private ...

packages & classpath on os x

1145 byte By christopherwesta at 2007-9-30 23:52:26
Hi, I had some questions about where i should be putting class files. i've got files in a package com.one2one3.io, so i've got a directory structure /com/one2one3/io/ and i'm wondering where is the generally accepted place to put that, its working for now in ~/Code/com/one2one3/..., but then ...

need some help... do I need one more thread?

933 byte By pao_lighta at 2007-9-30 23:52:39
Hi guys,I'm a bit confused about what I should do so I wanted to ask your suggestion.I'm writing an applet to implement an approach to estimate the average bandwidth between a client and a server, as suggested in a publication.What I have to do is to receive random bytes from the server and ...

On reflection

505 byte By Ognen_theBESTa at 2007-9-30 23:52:44
1.How to design and implement a tree datastructure that can contain arbitrary Objects (what are arbitrary objects?) as data elements in its nodes. The tree should be an n-ary tree (n>2 and varying). The methods in my classes should only use the Java Reflection API to access any class ...

Print out all methods in a program...

2005 byte By cstone6a at 2007-9-30 23:52:55
I am looking for a way to write a piece of code that recognizes methods, for instance if I were to put this program through the code:class bd220p1 {public static void main(String args[]) {int lightspeedi,lightspeedm;long days;long seconds;long distancei;long distancem;// approximate speed of ...

Help on Installation

634 byte By Scorpion_bitesa at 2007-9-30 23:53:27
Hey there,I wrote my first program in java and compiled it .I got this message:-libgcj-javac-placeholder.shThis script is a placeholder for the /usr/bin/javacmaster link required by jpackage.org conventions. libgcj'srmiregistry, rmic and jar tools are now slave symlinks to thesemasters, and ...