32,204 Topics
| |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 #///////////////////////////////////////////////// … | |
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 … | |
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 … | |
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 … | |
(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%) … | |
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? … | |
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 ? | |
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)___ … | |
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 … | |
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 | |
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 … | |
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. … | |
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] … | |
[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 + … | |
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 … | |
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] … | |
[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 | |
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 … | |
[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(); … | |
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:) | |
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 | |
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??? | |
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 | |
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) … |
The End.