36,051 Topics
![]() | |
I want to put music and sounds into the game I'm working on... Since the most common music-file is .mp3 and I don't know how to change it to another type, I'm worried that I won't be able to find the sounds I want - or any sounds at all … | |
![]() | Hello, I have a class named Time and when I run it I can enter the time, increase the hours and minutes, the minutes and hours will stored in their fields. I have another class called TimeTest, when this class is running, it needs to display the test results of … |
I have this Java program which gives an output that runs into 10000s of lines. I use Windows. When I run the program in cmd, It doesn't show more than around 500 lines, how do I see all my output? | |
sir can you help in displaying the information of installed software on our computer.. | |
Hi all, I need to draw simple lines on JFrame/JPanel. What is the easiest method to go? Also what do I need to display an image on JFrame/JPanel Thanks | |
hello i have a python chat server (multi client) and i wanted to connect a java client to it but i have been searching alot about java-python connection and i got solutions like using APIs as YAML or SOAP but i just can't figure out which one or if there's … | |
Hi. I need some help. That's a snippet of the class. [code=java]public constructor ( ChooserListener callback ) { // that's a constructor super(); Loader.load(); this.callback= callback; JFrame frame = new JFrame(); frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.add(this); frame.setSize(300,330); frame.setVisible(true); JPanel lectures = new JPanel(); String items [] ={BLANK,COMP,EIMC,MATH}; JList list = new JList(items); … | |
The program needs to read an excel file that contains a list of data (a list of students, thier module mark, student ID) The data needs to be presented in the following format: User ID : Name : Module ID : Mark The program also needs to have a menu … | |
I am writing a code which gives different colors to key works. I have written following code which will compare with key word say "ABC" when ever it finds "ABC" it will make it into blue color else red color.I am not getting whats wrong in my code. private void … | |
Create 2 Thread classes.One Thread is Incrementor and has one variable cnt1 with initial Value 0. Incrementor thread increments value of cnt1 by 1 each time. The other thread is Decrementor which has variable cnt2 with initial value 100. Decrementor thread decrements value of cnt2 by 1 each time. - … | |
Hi guys, I've a problem to import the jar file "[I]JFXBuilderRT1.jar[/I]" into [B]NetBeans 6.8RC1[/B]. I tried by add it to libraries, but with no good. Could someone tell me what to do??? Thanks [EL-Prince] | |
Tired of parsing all the source code involved in building mobile apps? Or perhaps the approval process for Apple's App Store is getting you down. Or maybe you're an aspiring commercial developer in search of the next must-have platform to tap. If you think Android might be the one, then … | |
The program is suppose to run through a list of strings. The stings are then put through a hash function (which works fine) and then "hashed" (for lack of a better word). The index is suppose to be an array of linked Lists to handle collision problems. I guess the … | |
Hi, I have 4 classes , 1 is the base class and the other inherts from it, it worked fine when compiling .. I tried to make them as a package , it works fine with the superclass but it doesn't with the other classes, It always gives me cannot … | |
who can I read the RUN ? Hi to all . I now start learning the java language . I have this program : [CODE] import java.util.*; class WTime { public static void main(String[] arguments) { GregorianCalendar now = new GregorianCalendar(); int hour = now.get(Calendar.HOUR_OF_DAY); if (hour < 12) System.out.println("Good … | |
Alright, well I am getting the ".class expected" error. I cannot figure out what it is nor is google helping much either. [code] public class Driver { public static void main (String[] args){ Scanner scanIn = new Scanner(System.in); Deck deck = new Deck(); Card[] hand = new Card[5]; Shuffle shuffle … | |
I always love to learn programing via Music/video players once I grasp the basics. How easy it is to do it, especially using windows DLLs or even Java libraries :) Thanks | |
i am having trouble putting together all the pieces of the puzzle to work together in harmony. My final project is simple,i have a jlabel with the question of how much does your dog weigh, I have a button and a jtextfield, the user enters the amount of there dog, … | |
I have a poker game that mostly works. When I run the program, the players only get Flush and Straight Flush hands. [CODE=syntax] public class Card { private String face; private String suit; public Card(String cardFace, String cardSuit) { face = cardFace; suit = cardSuit; } public Card(Card c) { … | |
I did make some attempts to search for this problem but was not sure exactly what to search for and being after 1AM my eyes wouldn't take reading through the 11+ pages of unrelated search results, so I will just ask the question... New to Java, want to use one … | |
![]() | Hello, I am using Blue J, I have 3 classes, time, date and patient. When I run the patient class, I can put patient details like name, address, DoB, time. The time and date classes are separate classes, how can I store the date (int) and time which I enter … |
I made a poker game and when I run it I get these errors... [CODE=syntax] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at PokerGame.Hand.getPairs(Hand.java:82) at PokerGame.Hand.whichHand(Hand.java:28) at PokerGame.DeckOfCards$1.actionPerformed(DeckOfCards.java:67) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) … | |
Hi, I want to display data which i have entered through form(html or jsp) into database. I have a servlet and a bean with a function of database retreival. I have got one attribute value in servlet through session transfer into bean's method to retrive data with respect to that … | |
hi, ive got a final year project to do. its lik monitoring if any data leakage is happening on the network/system. would like to enquire if is it possible to do such a system using java? thanks. | |
Hey Everyone, I am seeming to be in a spot of trouble. I am using the following code to read a HTML page, loop through it line by line. problem is it is around 7300 lines and takes about 20 seconds to finish the loop. I was wondering if anyone … | |
Hi. I need some help. Below is given a snippet of Java code. [code=Java]deptList = new JList(deptName); add(new JScrollPane(deptList)); deptList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); deptList.addListSelectionListener( listSelectionListener); } ListSelectionListener listSelectionListener = new ListSelectionListener() { public void valueChanged (ListSelectionEvent e) { if (e.getValueIsAdjusting()== false); callback.tell(dept[deptList.getSelectedIndex()]); } }; [/code] When you run it, it creates 2 windows. … | |
I am consuming a webservice which takes in 10 parameters. The aim of the call to the webservice is to obtain a Task ID.All the parameters for the call are supplied from a JSP page(using JSF). The following is the web service call [CODE] return mySoap.addTaskToProject(ticket, projectId, srcLangId, tarLangId, componentId, … | |
[code] package squishgame; /* * The player class allows for a player to be created with: * a name * a location on a grid (0-10, 0-10) * * The player can move North, South, East, or West but will not move off the * grid (must stay within (0,0) … ![]() | |
i am creating a simple web application using a tomcat project.My problem is that "The welcome file specified in the web.XML" is nor reading Content fo my we.xml is [code=xml]<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>admissions</servlet-name> <servlet-class>admission.AdmissionServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>admissions</servlet-name> <url-pattern>/admission</url-pattern> … | |
Greetings, Below is some code where I am trying to connect to a sub organizational unit in the AD. I am not sure the syntax to use. For the line expireOU = "Need to specify the sub OU here." what should I add there, if, say, the parent OU is … | |
Hi Frnds My application is in System A, i need to run System A application from System B like., In System B, server.xml file i will provide in below format [code=xml]<Context docBase="\\System A\E:\Go-Live\CIS" path="/cis" privileged="true" debug="10" antiResourceLocking="false" antiJARLocking="false"> </Context>[/code] url: [url]http://System[/url] B/cis Could u plz know me that above format … | |
i have a problem in a java program. : "accept a number and print the sum of digits." can anyone help me out??? | |
hi, i receive an error on this line -- if (salesPersonsName <! "end") -- error : operator ! cannot be applied to java.lang.String what can i do? thanks | |
How do you write a driver class? i've never used one before and its sort of dropped into the spec of this program. It uses public static void main(String[] args){} right? i have 4 other classes, so what should i do? | |
Hai Friends, Am programming in java swing, am using scrollane with scrollbars, i want to move the scrollbar at the middle of the panel at starting,am used setvalue but it not setting the given value. please reply me the solution for this problem. | |
So my code does everything I want it to do with the exception of when writing to storage I am not sure how to make true and false write as 1 and 0 respectively. I do not know if it's my syntax or my placement within my program...Kind of lost … | |
I am working in J2EE platform running in Apache Tomcat Server.Now i am stuck with 2 problems 1.I am using JApplet and invoking them in JSP page.This JApplet is enclosed with reading an xml file and displaying its contents.This is not working when i call the Applet in jsp page.I … | |
As you can see here that I have a text box with three submit buttons each redirecting to a different jsp page, however in those jsp pages, when I do request.getParameter("bid"), all I get is null... How can I fix this? [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> … | |
Dear JavaFans, I notice that if you use FileOutputStream and FileWriter to write a string into a textfile (.txt) , the Java i/o implementation doesn't seems to recognize the syntax \n which is the newline function. Anyone facing the same problem? The output text file will simple display all strings … | |
Hi guys, Firstly, thanks for the great community, have been lurking for a while and have picked up a lot of help from existing threads. I am making a small program which takes some inputs as strings, i then need to display a list of these inputs, be able to … | |
[code] package squishgame; /* * The stop watch class will allow a program to start and stop a stopwatch as * well as return the stopwatch as a string, a total ms's, or the hour, min, and * seconds separately. * * The System.currentTimeMillis() returns the number of milliseconds since … | |
Basically, this program checks if a word (String s) is a palindrome and prints out "true" if it is and "false" if it isn't. I am currently getting three errors: "unexpected type" at line 17, "incompatible types" at lines 30 and 32. [CODE=java]/** * @(#)palindrome.java * * * @author * … | |
Hi all, I want to make plugin.Pls tell me steps of making plugin in java.Thank for any answer. | |
I have been working on this for a bit, and I have made some great strides. However, there are just a few things bugging me that I can't seem to figure out. This is an assignment, and I don't expect anyone to toss out an entire program for me. However, … | |
I need this to try every ables[z] and the move on to another check. How can i check if its finished without finding the right word in the ables against the other array. Or if its finished and has found the word. [code] for(int i = 0; i < array1.length; … | |
i am trying to send a file using tcp on the local host itself but not sucessful. here iz the program tht i am trying to use. server side [code] [import java.lang.*; import java.io.File; import java.io.InputStream; import java.io.FileInputStream; import java.net.Socket; import java.net.ServerSocket; public class FileReceiver implements Runnable { private static … | |
How can i insert a decimal point into either an integer or a String(probably a String), 2 decimals from the right? like with money? eg/ 13922 139.22 | |
Really any ideas will help but id like to try and make the game hangman. id like to mak it simples in a gui(i dont really need the image of the hangman) but id like to atleast have it show all the letters and make them dissappear as they guess … | |
Hi, I nead to do some menu in gui Netbeans. I have got buttons, and a nead to change one JPanel in witch is some others components. Could you help me how to change JPanels? or some another way to do menu? i'm not good at it :( |
The End.