32,204 Topics

Member Avatar for
Member Avatar for Awesomeness

I'm doing active rendering for a game, and I was wondering,,, Does drawing outside a canvas still use just as much CPU? As in, If I draw one rectangle, and then draw another outside the canvas, does it ignore the other rectangle, or waste CPU on it? I want to …

Member Avatar for Awesomeness
0
83
Member Avatar for Doshag

Hello there! I am new to Java and DW, though I usually find great help already here! Say I need a constructor that accepts [COLOR="red"]variable number of parameters[/COLOR] up to 2 parameters, but if I pass only one parameter to this constructor, both parameters will take this number, and if …

Member Avatar for Doshag
0
174
Member Avatar for hwalsh

Hi, I've been working on this for two days. I need to pass an arraylist to another class. It gets the information, and will print out the menu, until the program goes back to the initial class, then the list empties. I don't get it, and I'm so confused. [CODE]public …

Member Avatar for hwalsh
0
7K
Member Avatar for LianaN

Hi! I want to delete an empty directory from FTP Server, however my code works only for files. Let's say the root directory in my FTP Server is called as [ICODE]Documents[/ICODE]. I want to delete a directory [ICODE]Director[/ICODE]. Then I execute [ICODE]client.deleteFile("\\" + selectedPath);[/ICODE], where [ICODE]selectedPath[/ICODE] is equal to [ICODE]Documents\Correspondence\Finance\Director[/ICODE]. …

Member Avatar for LianaN
0
834
Member Avatar for LianaN

Hi! How should I change the TableModel that extends AbstractTableModel to allow displaying empty data sets? Should the getValueAt method be chaged as follows? [CODE] public Object getValueAt(int row, int col) { Object str = ((Object[]) cache.elementAt(row))[col]; if (str != null) return str; else return ""; }[/CODE] ...or something else …

Member Avatar for quuba
0
1K
Member Avatar for LianaN

Hi! how could I delete all spaces in the string: [ICODE]String str = "AAA BBB CCC";[/ICODE] in order to get "AAABBBCCC" as a result? The following doesn't work: [ICODE]str.replaceAll(" ", "");[/ICODE] Thanks!

Member Avatar for LianaN
0
169
Member Avatar for pavank75

hi i got one problem to solve am almost did but facing problem for my last for loop iteration can any one help me this is the problem i received University of Newcastle School of Electrical Engineering and Computer Science SENG1110/6110 Programming Assignment 1 – Semester 1, 2010 Due: By …

Member Avatar for jon.kiparsky
0
190
Member Avatar for Alex86fire

Hey guys, I have a problem I can't seem to figure out properly: I have to implement a mirror in a java applet. For the mirror I used a second window. what I don't know: -how to rotate the second window -how to make it mirror what's in front of …

0
142
Member Avatar for Vexx

Hello folks, For my final project I decided to write an online poker game. Long story short I'm having trouble with a class I wrote to manage java.net.Sockets. The source for this class is: [CODE] import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.util.Iterator; import java.util.LinkedList; public …

Member Avatar for Vexx
0
466
Member Avatar for BLUEC0RE

**CHANGE PANELS IN TITLE TO Grid Layout I first want to apologize for filling the board with a noob question but I don't know how to phrase my question on google. So here we go! My prof has us working on GUI programming. I am trying to split up my …

Member Avatar for BLUEC0RE
0
87
Member Avatar for seryoga

Ive been trying to make a program that should keep the status of a hotel room layout. main method should return this: [url]http://img202.imageshack.us/img202/969/layoutview.jpg[/url] the cells should also be painted green if they are available for renting Yellow if they are booked or red if the are not available one class …

Member Avatar for Gerbiler
0
80
Member Avatar for aramesh1989

hi everyone i am working on internet banking project. I have an little idea about the project what are the functionality to implement and I am not perfect in web technologies. But I'll work hard on this project. My major problem is I am not getting where to start it …

Member Avatar for masijade
0
116
Member Avatar for crisabraham

An error called outofmemory error is coming up when I am giving nums value > 1. I have underlined where num comes. The strings bla1, bla2 etc, I gave for identifying the error. private void generateMouseClicked(java.awt.event.MouseEvent evt) { String s = new String(); String o = new String(); boolean check …

Member Avatar for jon.kiparsky
0
102
Member Avatar for XxPKMNxX

I have written a piece of code, everything is fine until i run it, i get [CODE]"Exception in thread "main" java.lang.NullPointerException at useCADSL.main(useCADSL.java:5)"[/CODE] i know what it means, i just cant see where to modify [probably the whole you read what you think you've wrote thing] my first class is …

Member Avatar for JamesCherrill
0
231
Member Avatar for ChrisXL

Hi everyone, I know you probably see a hundred of these during this time of year, but I have a project going at uni that requires us to create a string based hangman game from scratch. It's not anything fancy, and the game itself isn't too complicated, but where I'm …

Member Avatar for Gerbiler
0
142
Member Avatar for alexchen
Member Avatar for Megha SR

helo everyone......... could anyone of you please explain me the concept of ARRAYS. another doubt.........can anyone of you just give e the basic lgic ofbinary search, linear search, bubble sorting an selection sorting!! specially binary search and linear serch the concept i have not understod proprly!! and a smal program …

0
75
Member Avatar for Kiseki

Hi guys, i have a String time 23:00, how do i subtract it against a String today's time and get the remaining minutes? do i parse the String into a date type? any ideas is appreciated, thanks. [CODE] public String getTime() { SimpleDateFormat sdf = new SimpleDateFormat("kk:mm"); Date s = …

Member Avatar for Kiseki
0
243
Member Avatar for Akill10

Hey, I have a problem and am hoping that you can help me find a solution. I have a site created in dreamweaver. To do this, I made a template, with 2 editable regions, then set up all my pages. The problem I am having, is that I am trying …

Member Avatar for Akill10
0
90
Member Avatar for khaled_jawaher

i've posted a thread about reading xml file from remote machine. i've used JDOM to read xml file.bcs as someone has told me,it is really easy and flexible.now i am using it normally in local machine.i've opened a socket connectio between server and client machine.then i use JDOM to read …

0
75
Member Avatar for _neo_

Hi guys. I've just installed libnetty-java package on my ubuntu $ sudo apt-get install libnetty-java and then try compile this code [CODE] import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelUpstreamHandler; ... [/CODE] It throws this error: javac QuoteOfTheMomentClientHandler.java QuoteOfTheMomentClientHandler.java:1: package org.jboss.netty.channel does not exist import org.jboss.netty.channel.ChannelHandlerContext; ^ QuoteOfTheMomentClientHandler.java:2: package org.jboss.netty.channel …

Member Avatar for _neo_
0
1K
Member Avatar for ajst

Hi, I'm currently trying to create a program that will log into the web page given to it if supplied with the user name and password. but the problem im having is sending the POST request to the website and then retreiveing the URL it sends back to load in …

Member Avatar for ajst
0
316
Member Avatar for dilbertwannaB

Q1: CommissionReport class JavaAuto is a used car dealership that pays its sales associates by sales commission. Your application will produce a sales commission report as shown in the example screen shots. Your solution will contain three classes. The MyArrays class will contain several static methods for searching, sorting and …

Member Avatar for peter_budo
0
117
Member Avatar for DankDuggz

I need help the word class for a hangman program here is the code i have so far: /** * File: Word.java * */ package csc212project05; import static java.lang.System.out; import java.util.ArrayList; import java.util.Scanner; public class Word { private static java.util.ArrayList<String> wordlist = null; private char[] lexeme = null; // the …

Member Avatar for Slimmy
0
141
Member Avatar for incubus9x9

I need to change this from a bubble sort to a selection sort but i don't know where to start. Also I don't understand the difference between the two sorting methods, and which one would be more efficient. Thanks [CODE] import java.io.*; import java.util.Scanner; public class phase1 { public static …

Member Avatar for group256
0
132
Member Avatar for duminda1986

hi, i am final year student and i need to start on my project in 3 weeks time. Wel i love programing with java and i need to learn more on the depth area's.So doing a project using java will help me a lot. So what i am asking u …

Member Avatar for didar singh
0
528
Member Avatar for Dean_Grobler

Hi there, I am getting a 'Cannot find symbol error' on an array in my "ViewContact" Class. The array has been created in the "MainScreen" class. Below I have pasted the code for both classes as to provide you with as much information as possible: The MainScreen Class: [CODE] package …

Member Avatar for Dean_Grobler
0
697
Member Avatar for aquabat

Hi everyone! Im trying to fill up a tree with the entries from a text file and I can read the file and I know how to make a tree object. I just dont know how to combine these two to populate the tree. Any ideas are appreciated!

Member Avatar for aquabat
0
5K
Member Avatar for Yutxz

[B]Hey guys! I'm doing another school project, bleh ._. The method I need help on is called isFlush. It's a boolean that needs to determine whether the hand (subDeck) is a flush or not. A flush contains five cards with the same suit. I want to know how to just …

Member Avatar for Akill10
0
67
Member Avatar for oggiemc

Hi all, Im trying to run a simple applet which prints a message to the screen..The applet runs fine on applet viewer but when i try to view it in the URL bar i get the following error: load: class Test.TestApplet.class not found. java.lang.ClassNotFoundException: Test.TestApplet.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown …

Member Avatar for Akill10
0
87

The End.