31,001 Topics

Member Avatar for
Member Avatar for Virux

So to briefly explain my situation, I'm creating a DateChooser inside of a JComboBox. Most of them have these stupid little arrows to skip around through the years and months, like this one: [url]http://undocumentedmatlab.com/images/JIDE_DateChooserPanel.png[/url] But I want a drop-down list of the 12 months instead of arrows. So, I have …

Member Avatar for pbl
0
97
Member Avatar for blknmld69

How can I change the code below to applet? [CODE] import java.awt.*; import java.math.*; import javax.swing.*; import java.awt.event.*; public class Timer extends JFrame { JButton start = new JButton("Start/Reset"); JButton stop = new JButton("Stop"); JLabel time = new JLabel("Time"); javax.swing.Timer timer; int count = 0; public Timer() { super("Timer"); addWindowListener( …

Member Avatar for blknmld69
0
113
Member Avatar for LianaN

Hello! My JTree is filled from DB. If I add a new node, and then try to delete it, then the code shown below provides an error. As I see, selectedFolder is sometimes null. Why does it happen? Why [ICODE]getLastSelectedPathComponent()[/ICODE] doesn't return a node selected, but returns null in some …

Member Avatar for quuba
0
223
Member Avatar for kyojin

I can't seem to get my access to the private xCoor and yCoor. I try couple of things i just learn in school but none of em make sense. Can someone explain and tell me a way to get access to those xCoor, yCoor, width, and height while still leaving …

Member Avatar for Ezzaral
0
178
Member Avatar for NotThereAnymore

I am trying an example from my CS class. We learned recursion recently, and one of the examples I was given was to reverse a given string. The Java program compiles correctly, but when it is actually executed, instead of getting the intended result, I get this as my outcome. …

Member Avatar for aspire1
0
583
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
82
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
173
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
824
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
160
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
188
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
128
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
449
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
79
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
115
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
99
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
230
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
140
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
158
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
72
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
105
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
138
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
131
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
510

The End.