36,051 Topics

Member Avatar for
Member Avatar for Aissi

Hey, netbeans is giving me gray hairs with the localization wizard. First up, how can I completely remove a localization or resource bundle, now when I delete the file in the projec tree, it pops up right back up when I write the names of the components again. Second why …

0
142
Member Avatar for Roy_Valentine

Can anyone help me fix this problem I have with my code. I am supposed to be writing a Binary Insertion Sort method that calls a binary search method. I have code that is working for in order integers, when tested on reverse order integers it works except it places …

0
120
Member Avatar for Cort3z

Hi, I'm working on a game for a homework assignment. We are a group of 4 and basicly got the game running now, but we got issues with the rendering/drawing. I use BufferStrategy to get double buffering, and i have a custom draw-loop in a canvas. What this does is …

Member Avatar for Cort3z
0
96
Member Avatar for alisonchan30

Dear All, I would like to change the content pane of frame after pressing a button by the method: frame.setContentFrame(newContentFrame); However, after press the button, the Frame is frozen~~ How can I make it work? THANKS A LOT~~ [CODE]import javax.swing.*; import java.awt.event.*; public class Test{ JFrame main; JPanel panel1; JPanel …

Member Avatar for smoothe19
0
175
Member Avatar for brian505

Hi, In my application I am able to get logged in userid in profile tab page. I want to call a java script function in profile tab page to get dynamic data. Can I call a java script function in profile tab page? I want to call that js function …

Member Avatar for BestJewSinceJC
0
39
Member Avatar for ttboy04

I have been asked to write a public method called Caught() which takes a single argument of type LittleAlien and returns no result, for the AlienGame class. The method should check whether the argument occupies a stone corresponding to the stone occupied by the BigAlien. If so, the health of …

Member Avatar for ttboy04
0
163
Member Avatar for elSifa

I´m sorry if I haven´t investigated enough but I´m not quite an expert in hibernate and I´m tired of looking for something that won´t really solve my specific problem. What I mean is that I am a bit short of time. I have a User class that represents every single …

Member Avatar for quuba
0
2K
Member Avatar for bondgirl21

Hi, I wanted help implementing how to count vowels and preposition in a text file..this is what i have for counting words, the other are blank because i simply can't get it to work..Help is greatly welcomed.. [CODE]import java.io.*; public class FileIO { public static void main(String[] args) throws IOException …

Member Avatar for bondgirl21
0
1K
Member Avatar for deep.bwn

I can open .xls file with Desktop class. then edit something in the file. then save and close but. but next time when i open the file again it open previous one not updated if didn't i save it in different place. .I cant get any column/ value from the …

Member Avatar for peter_budo
0
59
Member Avatar for Pritha17

hello, I'm using eclipse platform to try to transfer file using Java mail API, but facing the following exception java.lang.NoClassDefFoundError: com/sun/mail/util/SharedByteArrayInputStream I know this is a common problem, but i've tried all possible measures to get rid of this exception here's what i tried * I downloaded javamail-1.4.3 from sun …

Member Avatar for parry_kulk
1
4K
Member Avatar for hidash_in

hi all, i cant able to open some applications like word,excel,adobe indesign,xml through java. and i used Runtime.getexec(); code but here when we run the program the application is automatically opening. i dont need to open on execution of the program. and also at the same time i want to …

Member Avatar for masijade
0
236
Member Avatar for tyson.crouch

G'day, I have the following java code to get all of my data from the DB, and is being passed into a vector in my jsp page. My question is, how do i iterate through the vector in jsp? [CODE] Vector roomDetails; Vector hotel; ... public Vector getHotelRooms(int hotelID){ int …

Member Avatar for javaAddict
0
99
Member Avatar for javastu

I have create a class called Airline Reservations and I have all my codes by I am having trouble assigning seats in the plane and need some help. Please help.

Member Avatar for BestJewSinceJC
0
107
Member Avatar for white feather

[CODE] private Map<String , String> c = new HashMap<String , String>(); .... //regx to get mString c.put(mString.group() , mString.group()); ..... //regx to get mNumber c.put(mNumber.group() , mNumber.group()); ....... Set set = c.entrySet(); Iterator i = set.iterator(); while( i.hasNext() ) { Map.Entry me = (Map.Entry) i.next(); System.out.println(me.getKey() + " : " …

Member Avatar for white feather
0
177
Member Avatar for SUNNY26

I am getting one error in compilesation of servlet progrm.the error is package import javax.servlet.*; does not exist.how to rectify my problem

Member Avatar for thabotharshan
0
211
Member Avatar for Robot1199

i need a little help here, what i need to do is create a ticket purchasing page where once the user has made a selection he/she is prompted for amount .And to pay that amount buttons are used .every time a button is clicked the amount reduces. I also need …

0
25
Member Avatar for themarval

Sorry for thee length but i have seven classes for this program. I took several functions and modified them to create a gui interface. I created a JFrame with 4 tabs that contain text only, then i have a 5th tab that has functional JButtons that when selected should prompt …

Member Avatar for rcsamich81
0
178
Member Avatar for mathpro

Hello, I am working on a A* Search Program using a MinHeap in order to get the lowest F(x) valued nodes, however, I am not sure why my MinHeap starts going crazy. I tried the MinHeap Code alone, and it worked fine, but when I run it together with the …

0
21
Member Avatar for punchinello

If I want to write a program that implements remote control of a computer over the internet. What programming knowledge do I need? How should I go about doing that? Any literature you want to recommend? Thank you very much!:)

0
56
Member Avatar for cool4angle

Dear friends, I am interesting in doing a project using 56K voice modem(normal modems that comes with pcs) to dial connected PSTN. After other party left the receiver, I am hoping to play a music or recorded voice clip to listen to them with the response of therm. Java is …

0
31
Member Avatar for bustersox

I have having problems figuring out how to get this code to run properly. I cannot seem to get my do-while loop in the main method to repeat. Also, I am having issues with my getConsonants method. It seems to always count 1 less than there actually is. Lastly, not …

Member Avatar for moutanna
0
2K
Member Avatar for jamesonh20

I was just wondering if it were possible to link a sound to an option selected in a scanner class in java? For example: [CODE]import java.util.*; public class GameTest { public static void main(String[] args) { Game myGame = new Game(); Scanner myScanner = new Scanner(System.in); int size = 30; …

Member Avatar for jamesonh20
0
163
Member Avatar for vishalsnc

Cn anybody pls help me.. i have develoed application which is using JSP and servlet bt i want to make it acc to MVC2..

Member Avatar for chauhan_vipul87
0
189
Member Avatar for elSifa

[CODE] @ManyToMany (fetch=FetchType.LAZY) @JoinTable( name="confirmed_join_table", joinColumns={@JoinColumn(name="user_id")}, inverseJoinColumns={@JoinColumn(name="match_id")} ) @IndexColumn(name="position") private List<Match> confirmedMatches = null; @ManyToMany (fetch=FetchType.LAZY) @JoinTable ( name="candidates_join_table", joinColumns={@JoinColumn(name="user_id")}, inverseJoinColumns={@JoinColumn(name="match_id")} ) @IndexColumn(name="position") private List<Match> candidateMatches = null; [/CODE] This is what I have in one of the classes, the other class has the inverse association, but I don´t think …

0
144
Member Avatar for brianmack

I'm having trouble with this code. I'm sure it's something stupid (I'm in a class for Java) so please forgive this Java Newbie. [code] package Student; import Entity.*; import ExceptionManagement.StudentException; import java.util.ArrayList; import java.util.List; import javax.swing.*; public class DataManagerBean implements DataManager { ArrayList<Student> students = new ArrayList<Student>(); ArrayList<Course> courses = …

Member Avatar for BestJewSinceJC
0
246
Member Avatar for sinister747

Hi All, I could really use some help in sorting vectors, i know the collections.sort(x) method will sort a vector of numbers etc however i have a vector full of objects and i need to sort them; the object contains details of a website please find the fields below; [CODE] …

Member Avatar for moutanna
0
136
Member Avatar for kvass

Hi guys~! Consider the following code: [CODE=Java] public void reset(int[] arr) { for (int i=0;i<arr.length;i++) { arr[i]=0; } } [/CODE] I know that regardless of what the actual array is before this method is called it will not change afterward because the method cannot modify it since it is not …

Member Avatar for kvass
0
97
Member Avatar for pringles08

[code] //to check if numeric public boolean checkNumeric(String user_input) { for( ; x <= user_input.length() ; x++ ) { if(!Char.isDigit(user_input.charAt(x))) { return flag; } } return noError; }[/code] it says: cannot find symbol variable- char Help please.

Member Avatar for BestJewSinceJC
1
156
Member Avatar for Fulladder

I am designing a bank system Soon as the user opens the display the welcome message alone with all the latest offers are displayed without any input. afterwards the user is given 4 set of instructions for example: enter 1, 2, 3 or 4 to display the 1. Display balance …

Member Avatar for Fulladder
0
92
Member Avatar for whimsical1987

Hi experts, I have a question on generating a hashtable which contains only unique numbers. Can anyone help me out. My code is here. I want to check if the key and value are in the hashtable or not. if they are in the hashtable i break to start generate …

Member Avatar for JamesCherrill
0
89
Member Avatar for IOwnAndPwnU

[B]So basically, my JMenuBar has to appear everywhere in my applet (I have CardLayout, 3 cards/screens), in every screen and in the same location (looks nice, consistency). How would I go about doing this?[/B] So, I was making a menu for my applet. I followed the exact instructions at: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] …

Member Avatar for BestJewSinceJC
0
237
Member Avatar for SwapnilDD

Hi.. I am trying to connect to my database (MySQL) within a JSP page. The is compiling without any error, but still I am not getting any output. Can anybody help?? The code is as follows: [CODE] <%@page contentType="text/html" pageEncoding="windows-1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head><title>Enter …

Member Avatar for SwapnilDD
0
2K
Member Avatar for aks_1

i want to compile .jsp file. i have downloaded tomcat 6.0. and set environmental variables e.g. set PATH="C:\Program Files\Java\jdk1.6.0_10\bin";%PATH% set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10 set CLASSPATH=.;C:\Program Files\Apache Software Foundation\Tomcat\common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat\common\lib\jsp-api.jar;C:\Program Files\Apache Software Foundation\Tomcat\common\lib\el-api.jar;C:\Servlets+JSP;..;..\.. i hava searched pages related to configuring web.xml, context.xml etc but i am still unable to load …

Member Avatar for aks_1
0
145
Member Avatar for KatWoman27

This is what I need help with: "Write an application to simulate the rolling of two standard six-sided dice. The application should use an object from the class Random to roll the first die and then again to roll the second. Each die can have the values of 1 to …

Member Avatar for javaAddict
-1
381
Member Avatar for ihong154

This is my assignment Starting with last week's Property project, build an array of Properties in your main(). Add static methods to the Property class: void ArraySort(Property[] property_list, String key_field) This will sort the array, property_list, based on the argument, key_field, passed in. These are the legal choices for key_field: …

Member Avatar for javaAddict
0
149
Member Avatar for JAK3CAL

Ok so I'm doing some practice questions, and this one is trippin me up a bit. I need to create an array that stores data 0.0, 0.1, 0.2, 0.3, all the way to 20.0. Then I have to compute the sums of the elements that are not integers (i.e 0.0, …

Member Avatar for javaAddict
0
110
Member Avatar for laveena

how can i make my java application dynamic so that if any user rename the folder- Download,Music,Documents of Filesystem automatically reflects changes to my application

Member Avatar for peter_budo
0
53
Member Avatar for laveena

i want my java application to access windows drive and pen drive. how can i mount drives in linux root using java. so that it will be easy to access files #mount -U34D5-FCF7 /mnt/c: is a linux commnad i want this to be executed by my java application

Member Avatar for peter_budo
0
60
Member Avatar for Ashwin1985

Any suggestions / code examples for Encryption/Decryption of files(any file format) in java. command line args -

Member Avatar for peter_budo
0
481
Member Avatar for IOwnAndPwnU

Hi. I am coding a game for my basic Java programming course, and I am currently coding a game (Othello, aka Reversi). I am having issues with the JButton size. [CODE]public void game () { resize (800, 680); game = new Panel (); Panel board = new Panel (new GridLayout …

Member Avatar for JamesCherrill
0
2K
Member Avatar for pateldeep454

I want to put everything into one applet. How do I do that? Please HELP :( [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { public void paint (Graphics g) { g.drawString ("Name" , 50, 25); String first; first = JOptionPane.showInputDialog (null, "Enter first number: "); …

0
55
Member Avatar for IOwnAndPwnU

[B]How would I implement two listeners?[/B] I need to implement ActionListener and [URL="http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html"]MouseListener[/URL]: I have the [CODE]public class Othello extends Applet implements ActionListener[/CODE] which is just below my libraries. But I also want to be able to use the MouseListener. So, I'm having trouble implementing both listeners. I tried: [CODE] …

Member Avatar for moutanna
0
133
Member Avatar for stain3d

Hey guys. I wanted to know if someone can tell me what's wrong with my code. I got it to work, to a point. It shows all the months, however, when a user inputs the month/number it ends. Which it needs to playback the month... Example: 2 = March Here's …

Member Avatar for moutanna
0
3K
Member Avatar for chathuD

guys iam new to c++ ,i even dontknow what are the tools to use develop c++ aplications so if sny body know tools like that (c# MS visual studio,java netbeans) pls let me know. and ma problem is i need to creat a link list on c++ .and i googled …

Member Avatar for Lerner
0
167
Member Avatar for CoderDude123

Hi there, I am making (more like, have already made) an IRC bot in Java. I would like to be able to query a shoutcast server with my bot and return basic information (such as now playing, bitrate, etc). I have scoured google and only found php code which i …

0
76
Member Avatar for KatWoman27

I got an assignment, and this are the instructions: "Design and implement a Nim class and a NimGame application to allow two human players to play the game of Nim. The game starts with three piles of stones. The first pile has 3 stones, the second pile has 5 stones, …

0
58
Member Avatar for InsaneOstrich

I have to write a JUnit test method for a short program that lets the user add/remove/browse images in a collection. (Adding an image is done with a JFileChooser) The test method that I wrote exhibits some really bizarre behavior; it passes every so often, but fails most of the …

Member Avatar for InsaneOstrich
0
555
Member Avatar for spaniel

Hi, I'm trying to develop a linkchecker, the HTML text I'm using it on though has a few lines such as this: [CODE] <li><a href="PhD/refs.html"> <b> References </b> </a> section of PhD <li><a href="WWM/refs.html"> <b> References </b> </a> section of WWM proposal[/CODE] which aren't being picked up by my linkchecker. …

Member Avatar for moutanna
0
107
Member Avatar for handsomedan

I am having a couple of problems with my code. First, whenever I try to remove the JOptionPane from line 79 in my code, I get a NullPointerException from the line this.dbGraphics = this.dbImage.getGraphics(); a couple of lines down from the JOptionPane. Does anyone know why? Another problems is that …

0
22
Member Avatar for callie

Hey. I need a method that creates a matrix from an array, for instance: ({10, 11, 12, 13}, 2) should return {{10, 11, 12}, {13}}. [code]public class Matrix{ public static int[][]toM(int[] array, int a){ int[][]matrix = new int [(array.length)/a][a]; for (int i = 0; i < array.length; i++){ int value …

0
68

The End.