32,204 Topics

Member Avatar for
Member Avatar for c++student01

I keep getting NoClassDefFoundError so I cannot check if the rest of my program works. It works on the school computers but it does not at my house. I set up the path and classpath variables how my teacher told me for derby but it still will not work, any …

Member Avatar for vchandra
0
112
Member Avatar for lwschjang

Basically, I am having trouble figuring out how to work my if statements. The only one that works is the final statement and that is due to it not having the [CODE]if("#".equals(e.getActionCommand()))[/CODE] statement. So, how should I go about allowing the user to select the quantity in the combobox and …

Member Avatar for lwschjang
0
151
Member Avatar for Fulladder

I am designing a cinema system I want to call a another class which has a arraylist method and then display the elements inside the arraylist. Please help I made two sample classes [CODE]Class cinema() . . . . public ArrayList<time> getTime() { for (Show show : getTime){ } return …

Member Avatar for quuba
0
3K
Member Avatar for cool_jatish

hi........ can anyone tell me the connection strings to connect JAVA JAPPLET to sql server 2005 database and also the execution of SQL statement in java thanks

Member Avatar for Ezzaral
0
124
Member Avatar for softdev

Hi Guys, I am trying to create a game of a two way traffic with a human trying to move between the cars to the other side without being hit by a car. I can detect the collisions, but the main problem is my cars don't move. what maybe the …

Member Avatar for quuba
0
105
Member Avatar for FancyShoes

Hi I am trying to return a boolean value into another method, but it's not working. [CODE] public static boolean ItemFound(boolean item, String desc1, String desc2, JTextArea txt){ if(item == true) txt.setText(desc1); if(item == false){ txt.setText(desc2); item = true; } return item; }[/CODE] and inside the other method I have …

Member Avatar for FancyShoes
0
152
Member Avatar for ceyesuma

Hello. Can someone explain what this InitialContext(): is looking for? [code] public JDBCSchoolofdbDAO() { try { Context initCtx = new InitialContext(); Context envCtx = (Context) initCtx.lookup( ModelUtils.getResource("JavaCompEnv")); dataSource = (DataSource) envCtx.lookup( ModelUtils.getResource("DataSource")); } catch (NamingException x) { ModelUtils.log(x); throw new InternalError(x.getMessage()); } } [/code] [code] DAO=schoolAppModel.dao.JDBCSchoolofdbDAO #///////////////////////////////////////////////// # DAO=jsfdb.model.dao.JDBCSubscriberDAO #///////////////////////////////////////////////// …

Member Avatar for ceyesuma
0
2K
Member Avatar for owartz

My assignment is as follow: Create a class IntegerSet. The IntegerSet can hold integers in the range [1-100]. Define one or more instance variables to represent IntegerSet properties and store elements. Additionally, provide the following methods: a. One or more constructors. b. Method void add(int) inserts a new element to …

Member Avatar for jwenting
0
137
Member Avatar for neo_philiac

Hi, I got this piece of code from this forum and i was trying to modify it so that I can make it dynamic. I modified it a little bit to add multiple collapsible panels. But I need some help. 1. I need to add these panels dynamically. If I …

Member Avatar for moutanna
0
101
Member Avatar for synxmax

Dear Guys I want to start creating mobile based applications and i am newbie in this field , where should i start , how to create a simple application jar file which can run on mobile devices , for example a simple interface with buttons , sound handling , graphics …

Member Avatar for synxmax
0
153
Member Avatar for habsy

(Payroll) Write a program that reads the following information and prints payroll statements in show message dialog box. These are the inputs: Employees Full Name (e.g. Mohammed Al Zakwani) Numbers of Hours worked in a week (e.g. 40 hours) Hourly Pay Rate (e.g. 6.75) Federal Tax withholding rate (e.g. 20%) …

Member Avatar for jasimp
0
89
Member Avatar for veroniclake

I opened my control panel thinking to uninstall un-wanted softwares. but i saw 3 java se's install in my machine. the size of java 6 update 7 (371 mb)>the size of java 6 update 17 (147 mb). why is it so? why 17 is 50% less in size than 7? …

Member Avatar for ~s.o.s~
0
71
Member Avatar for beforetheyknew

Hi guys, I'm still learning java and to code in general. How would i take a word, open a web browser, and define the word in google ? Is that even possible ?

Member Avatar for jwenting
0
99
Member Avatar for bubunchan

i'm doing java exercise, their is 6 question and i had done 5. another 1 i tried all the alternative but still error. this code: [CODE] class __(1)__ { static ___(2)___ int MIDTEST = 30; public static void main(String [ ] args) { int a=15, b=10, quiz, ___(3)___; Course ____(4)___ …

Member Avatar for bubunchan
1
119
Member Avatar for bettybarnes

there are 3 classes letterd, letteru, letterh. each class uses loops to print asterisks in the form of letter d, u, h. each letter has two charateristics width and height. the constructor of each class accepts two integer parameters that correspond to height and width. each class also has a …

Member Avatar for bettybarnes
-2
239
Member Avatar for grady-lad

hi im am working on assignment and i would like to give a Jbutton an integer value i have delcared the buttons using an array (8 buttons in total) but i would like to give each button a diffrent value eg button 1 = 32 button 2 = 44

Member Avatar for JamesCherrill
0
59
Member Avatar for liran

Hello I want to implement this function: boolean check(String str,String exp) that gets a string, and an expression and see if it mathches. But (!), according to a format by '*' (maybe similar to the SQL LIKE statement, but with * instead of %). Examples of tests of this function …

Member Avatar for liran
0
209
Member Avatar for yeap521

Regarding the title, i want to know the exact way to writing text data to a text file on a web server using http connection in J2ME. I tried the way as below: OutputConnection connection=)OutputConnection)Connector.open("http://localhost/message.txt;append=true",Connector.WRITE); OutputStream out=connection.openOutputStream(); PrintStream output=new PrintStream(out); output.println("Testing"); out.close(); the codes have no problem and no exception. …

Member Avatar for peter_budo
0
101
Member Avatar for s2xi

Hey guys, I've been looking around the web but can't find a definite answer for this one. I have a program I'm making and I want to cut down my lines by using an array and just have it create my lines for me. I have this set up [code] …

Member Avatar for s2xi
0
87
Member Avatar for bigbags911

[code] import java.util.*; public class Homework11 { Scanner input = new Scanner(new File("keyvalues.txt")); Map<String, Integer> wordCountMap = getCountMap(in); for (String word: wordCountMap.keySet()) { int count = wordCountMap.get(word); while (input.hasNextLine()) { line = input.nextLine(); numLine++; Scanner word = new Scanner(line); while (word.hasNext()){ String nextWord = word.next(); numWord++; numChar = numChar + …

Member Avatar for jwenting
0
91
Member Avatar for WesFox13

Hello there. It's me again. I think I got most of the Pseudorandom code fixed but there's a problem. [CODE]// Name: Wesley Montgomery // Assignment 1 (Pseudorandom Class) // CS 211 (5:30 PM-7:40 PM) // Craig Niiyama // This class creates a Pseudorandom Number as well as returns the number …

Member Avatar for jwenting
0
210
Member Avatar for charlieruns

I have a Photoalbum class and a Photo class. The Photoalbum class obviously holds a bunch of photos in an array. Each photo has a subject, location, date, and path. I need to make a method to search for a a photo with a certain String path. I tried: [code] …

Member Avatar for vchandra
0
179
Member Avatar for white feather

[CODE] maxDays = calendar.getActualMaximum(calendar.DAY_OF_MONTH); System.out.println(maxDays); [/CODE] When looking through the javadocs it seems like this would work but it apparently doesn't. Any help on figuring why it doesn't or another way would be appreciated

Member Avatar for BestJewSinceJC
0
148
Member Avatar for grady-lad

Hi I am Making a horse racing application .... and the concept is when you enter a number in the textfield and select a horse(one of the 8 jButtons) the application will randomly select one of the JButtons and if the Jbutton is the same as the one selected by …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for bigbags911

[CODE] public class TicTacToeGame { public static final int board_size = 3; // number of rows or columns in the board public static void main(String[] args) { char board[][] = new char[board_size][board_size]; // the game board TicTacToeGame p1 = new TicTacToeGame(); // create the players TicTacToeGame p2 = new TicTacToeGame(); …

0
53
Member Avatar for Sthe

Hi guys I'm completely new to programming, but would like to learn how to create crosswords in j2me, can someone help me with a source code...thanx:)

Member Avatar for peter_budo
0
125
Member Avatar for buffonomics

Is it possible to programmatically determine the currently installed graphics driver in windows, Mac, or Linux? methinks to check the system registry for windows. If so, where and what about the other OS? Major props to anyone who can answer this one :P Thanks

0
88
Member Avatar for saggykulji

i am working on Deque class which is wrapped arond array....jus like the circular array works. How can i prompt the user to decide the size???

Member Avatar for saggykulji
0
77
Member Avatar for cool_jatish

Hi......... Can u tell me SQL query to retrieve UNICODE Strings from the database................... Specifications........ 1] Language JAVA::: a) JAVA SWING applet b) JDBC-ODBC Bridge 2] Database a) MS Access b) Datatype :: TEXT Thanks in advance

Member Avatar for javaAddict
-1
76
Member Avatar for Hitman908

Hi, i have a hw assignment and i need help. I have done the first class already which is the city class. Heres what i got: [code]public class cityclass{ private String cityname; private int days; private double cost; private float rating; public cityclass(String newcityname, int newdays, double newcost, float newrating) …

Member Avatar for mckrm
0
280

The End.