31,002 Topics

Member Avatar for
Member Avatar for sydneyrustle

hi all, just looking for some help with setting up an array of items for a stocktake program. i have an item class that works, and now i need to create an array to hold an array of the items. the item class code is class Item { private String …

Member Avatar for yassar
0
112
Member Avatar for Harvester

I have a random String with numbers in it (for an example "G8j3sEb34ab4dk5A") and I need to either tokenize it or be able to just be able to tell where the numbers on that string are. StringTokenizer doesn't work (I think) because A12B should be A 12 B and not …

Member Avatar for miri
-1
52
Member Avatar for berg249913

I have been given a class and i have been asked to write short programs in order to find out the answer. The first question is: "what is the result of calling method1(without parameters)?" The program i was given is below: package ; // approximate imports import java.awt.Frame; import java.awt.event.WindowListener; …

Member Avatar for server_crash
0
89
Member Avatar for apcxpc

Hi all I've programmed a relay chat system in Java. Just having two GUI-related problems with the chat client itself. [B][U]Problem #1[/U][/B] : I can't get the chat windows to scroll as new text appears in them. The scroll bar [i]does[/i] appear when it needs to, but it remains at …

Member Avatar for jwenting
0
389
Member Avatar for bluesmiley

Can someone please help me with this program? it is supposed to ask user to input ten integers which are part of an array and then output that array and then output the numbers in ascending and descending order in an array. can you repair this program? thanks. import java.io.*; …

Member Avatar for NPH
0
145
Member Avatar for nabil1983

hello everyone. ok i got a program (see below i know its long but just copy and paste and it will work),, my only problem is i need to include a search method (i.e. where i enter CDName and it prints out the rest of the details of the CD.) …

Member Avatar for NPH
0
110
Member Avatar for moonduke

Please Help my code for this program is listed below what the program is supposed to do is also listed below. I can't get it to work. The problem Write a program to compress a message consisting of the ten symbols A, B, C, D, E, F, G, H, I, …

Member Avatar for NPH
0
146
Member Avatar for server_crash

I can can use a BufferedReader to open a Streamat the command line, like this: [Code] BufferedReader br = new BufferedReader(new InpuStreamReader(URL.openStream())); [/Code] Once I try to use this same statement inside of my applet, I get an AccessControlException. I know it's something to do with security, but how do …

Member Avatar for Phaelax
0
137
Member Avatar for freesoft_2000

Hi everyone, I have a JTextPane and i am trying to insert tables into the JTextPane. I am using the default rtf editor kit together with styled document. I don't want to use the insert component to simply insert a JTable as if i do that then removing columns and …

Member Avatar for Phaelax
0
102
Member Avatar for freesoft_2000

Hi everyone, I have a JTextPane with an embedded JLabel and i am trying to print the contents of the JTextPane. When i print it an exception gets thrown saying that there is an error in the views. This only happens if i have an embedded jcomponent in the jTextPane …

0
153
Member Avatar for George2

Hello everyone, I want to clone the content of a Hashtable (its keys, its values and its key-value relationship). But I have found that the clone method can not completely clone a Hashtable, as is mentioned in the description of clone method of Java API Specification, Creates a shallow copy …

0
81
Member Avatar for server_crash

Ok, I'm working with some Strings, and these Strings will get remade up to an infinite number of times, and I know that a new object is created each time. So, which is worse.. Keep using the String, and have the value continously change, or Use a StringBuffer, and continously …

Member Avatar for Paul.Esson
0
326
Member Avatar for George2

Hello everyone, I am looking for open source gateway written in Java. It is better a light-weighted and easy-to-configure gateway, which could be used in J2EE/J2SE/J2ME applications. Thanks in advance, George

Member Avatar for George2
0
330
Member Avatar for server_crash

I've been working on this webcrawler and I've ran into a problem. I can read the first URL and get all the URLs out of the HTML code, but I can't seem to set up a looping structure that will work. This is basically what it does: Searches through html …

Member Avatar for server_crash
0
137
Member Avatar for EvilObsidian

Thanks for taking the time. I'm a beginner and I ran into a roadblock with the following code. The assignment is to create a class Complex to add and subtract complex numbers and a Class to test it. Unfortunately, I can't get it to compile so I can debug it. …

Member Avatar for server_crash
0
123
Member Avatar for rackus

Hi there, I have got this problem which is rather puzzling, to me at least. My team-mate and I each did our coding and they work as standalone. His part is the UI and mine the backend processing. He did his code using BlueJ using JDK 1.3, I did mine …

Member Avatar for rackus
0
501
Member Avatar for moonduke

Please Help my code for this program is listed below what the program is supposed to do is also listed below. I can't get it to work. [B]The problem[/B] Write a program to compress a message consisting of the ten symbols A, B, C, D, E, F, G, H, I, …

Member Avatar for Phaelax
0
209
Member Avatar for bob901

soz bout all this posting :S i know this is a really n00b question but how do i add a black background to this prog? import java.awt.*; import java.awt.event.*; import javax.swing.*; public class CMP extends JFrame { public void myframe() { JFrame frm = new JFrame(); frm.setBounds(0,0,800,400); frm.setVisible(true); frm.addWindowListener(new WindowAdapter() …

Member Avatar for bob901
0
193
Member Avatar for server_crash

I've been working on this project and I've had to look at a bunch of code, and go through many tutorials. One thing I've consistently noticed is that the programmer checks to make sure the current thread (Thread.currentThread()) is equal to the one they created in the class constructor. Now, …

0
54
Member Avatar for markymarkb1000

Hi...I have created a private static main method which instantiates an array of 3 different types of objects depending on the choices entered in on the command line. Here is my code: public static void main(String[] args) { //creates local variable currentIndex //creates employee array of type worker which can …

Member Avatar for server_crash
0
130
Member Avatar for Ghost

Hi, I'm trying the Space Invaders tutorial ([url]http://www.planetalia.com/cursos/index.jsp[/url]). I'm on part 13, which divides the code into classes. I'm using JBuilder and when I do this, I get error messages saying that the class I put in a new Java file doesn't exist. I put the java file in the …

Member Avatar for jwenting
0
131
Member Avatar for morgryan

Hi there I need to create a command line interface in java. I have something that connects to an oracle database and allows me to do a predetermined select steps. I need some sort of java code that will allow me to have a prompt: Which you like to do? …

Member Avatar for Paul.Esson
0
140
Member Avatar for Ghost

Hi, I was wondering if there was a way to find open ports on a server. I'm trying to write a program that tells the user whether they have any open ports or not and if they do, which ones and how to fix them. Thanks.

Member Avatar for jwenting
0
171
Member Avatar for bob901

Hey all :) does anyone know of any good tutorials for java?? Ive already done the Invaders one and "Intro to computer science with java". please post with some good ones :) heres the Invaders one.. [URL=http://www.planetalia.com/cursos/index.jsp]here :)[/URL]

Member Avatar for bob901
0
144
Member Avatar for bob901

hey all.. does anyone know how to make a decryter if so can you please tell me step by step :) thx

Member Avatar for bob901
0
188
Member Avatar for Bud4java

How do I initialize an array that has been called from a file? There will be 5 values in the array. So should my file "input.dat" have: 5 (number of values) 4 (value) 6 (value) 7 (value) 2 (value) 7 (value) Example: BufferedReader br = new BufferedReader( new FileReader("input.dat")); and …

Member Avatar for paradox814
0
108
Member Avatar for bob901

hey all when i run this code : import java.awt.Canvas; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.WindowEvent; import java.awt.event.WindowAdapter; import java.awt.image.BufferedImage; import java.net.URL; import javax.swing.JFrame; import javax.swing.JPanel; import javax.imageio.ImageIO; public class SpaceInvaders { public static final int WIDTH = 800; public static final int HEIGHT = 600; public SpaceInvaders() …

Member Avatar for server_crash
0
104
Member Avatar for stupidenator

coming up in a week or so, I will be taking the AP Computer Science A Exam. I'm getting a little nervous about it. Has anyone ever taken this? What did you think about it? Anything in particular that I should really study up on? I have a book on …

Member Avatar for server_crash
0
270
Member Avatar for luisator

Hi everyone! I am trying to develop an application to communicate with a Microsoft Acces database. For doing that I import the java.sql package to use the DrvierManager class to get a connection. The problem seems to be the application doesnot find the java.sql package. I have the 1.4.2_08 version.. …

Member Avatar for jwenting
0
417
Member Avatar for SyLk

can someone explain to me how i can go about implementing a string from a jtextfield and storing it to a file please. I would really appreciate some sample code on this one. Thank you

Member Avatar for Phaelax
0
136

The End.