35,617 Topics

Member Avatar for
Member Avatar for corby

Hey im trying to run background music when the user clicks the button. below is my coding. when i run the program, it says file cannot be found. any help would be appreciated [CODE]import javax.swing.*; import sun.audio.*; import java.awt.event.*; import java.io.*; public class Sound { public static void main(String[] args) …

Member Avatar for JamesCherrill
0
6K
Member Avatar for yasheela

import java.lang.*; import java.util.*; class Project { public static void main(String a[]){ Hashtable<String,String>language=new Hashtable<String,String>(); Enumeration<String>names; String str1; String lang; language.put("insert","Load"); language.put( "select","Dump"); language.put("*","All"); language.put("from","as"); language.put( "where","Filter"); language.put( "Group","Group"); language.put ("Join","Join"); language.put("Order By","Order By"); language.put("Distinct","Distinct"); language.put("Count in lines","Limit"); language.put("set","set"); language.put( "Describe","Describe"); language.put( "Group By","CoGroup"); language.put("delete","Flatten"); language.put("dual","Sample"); language.put( "into","as"); language.put( "count *","count …

Member Avatar for hannahaddad
0
137
Member Avatar for StarTrekCafe

hi. can any one help. i am doing a java application. and using a button listener class. and says cannot find the text box object. can you help. will do the sample code. how to get this to work. marvin. ps: here's the code if(e.ActionCommand().equals("btnName"}} {JOptionPane.showMessageDialog("My name is: " + …

Member Avatar for stultuske
0
167
Member Avatar for Gl753

I'm working on a Database assigment but I'm kind of stuck. It seems to be the Double value that's causing the issue because when I use the Varchar data type I can create my table. Is there any way I can use Double without using Varchar. Any help is much …

Member Avatar for Dani
0
261
Member Avatar for nabilmahesaniya

hey guy i have adoubt regarding public void static i mean im not able to get when to write at that time ith public void......... so can someone help me

Member Avatar for Philippe.Lahaie
0
157
Member Avatar for daniel1977

I don't think I fully understand the concept of looping. Below is what I put into eclipse and the results I get, am I doing something wrong to get the correct results if you could help thanks /* Working with a sentinel value Anderson, Franceschi */ import java.util.Scanner; public class …

Member Avatar for hannahaddad
0
250
Member Avatar for ameer.mhmed

method non static public class LoGIne{ public String user (String a){ String rr = txt_user.getText(); String pass = txt_pass.getText(); //ConDb(user,pass); return rr; } --------------------------------------------------- method static public static Connection ConDb(){ //String USER ="mh"; String d ,l,h; d =("ameer"); String PASS=d; LoGIne a = new LoGIne(); String USER = a.user(h); // …

Member Avatar for ViolaPAllen86
0
402
Member Avatar for mohan@nano

i have a text box in that i'll enter a value . The value should generate the tree structure using javascript .is there any pulgins for the above . please suggest me

Member Avatar for mohan@nano
0
69
Member Avatar for mjsh

Hey, so I have an assignment for java using the hailstone sequence. My teacher wants us to print out the length of the longest sequence and the number for that. The problem I'm having is that I need to print out the actual sequence underneath the first part. Can anyone …

Member Avatar for JamesCherrill
0
819
Member Avatar for susanna.newkirk

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package theaterrevenue; import javax.swing.*; import java.awt.*; import java.awt.event.*; /** * * @author */ public class TheaterRevenue extends JFrame { final double percent = .20; double adultCost; private JTextField label2; private JTextField …

Member Avatar for susanna.newkirk
0
768
Member Avatar for rubeea.jaffari

Hello everyone, I am designing a simple game with graphics in which I am trying to add a keyListener to my Jframe but the keyListener nor the mouse Listener seem to respond. Here's the code: import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.net.*; import java.io.*; import javax.imageio.ImageIO; public class PaintDemo …

Member Avatar for JamesCherrill
0
442
Member Avatar for Datagram

Hi all, I've just started out with programming and I'm working on a Binary Tree of integers. I have the Node and BinaryTree classes almost complete, but I'm having a derp moment trying to test my minimumVal method from the main and not sure on what to pass into the …

Member Avatar for Datagram
0
278
Member Avatar for napninjanx

So far I learned how to download the JDK Java Development Kit. Then created a PATH file cause it the training video they said something about sp Java won't mix up directories and so on. So putted the semicolon at the end of the Path File... In Environment Variables. Then …

Member Avatar for napninjanx
0
280
Member Avatar for anku83

I have this code which finds the duplicate rows .I want to check if the top row has weight greater than given minimum support..If true then generate its subsets. If row 1 i.e 11110011 wight>min_sup then generate subsets....if not then jump to next row here 1 represents presence of items …

Member Avatar for anku83
0
318
Member Avatar for Ismail_3

hi all, i need lil help to do this program Students number = 10 Students name= Ahmed, Ismail, Mohammed, Esra, Ali, Omar, Abulla, Khalid, Talal, Sara Develop a program in Java to accept the number of students in a section for a subject and for each student accept the Student …

Member Avatar for Ismail_3
-1
176
Member Avatar for gahhon

i am new to the e2glite due to assignment required. Currently using SWI-PROLOG as my coding software, and now i was copy some example code and also downloaded e2glite.jar from e2glite web, after i follow their instructions, i am able to view the java on browsers but i can't able …

Member Avatar for Nimrah
0
322
Member Avatar for asif49

Given a Java project created using Netbeans that has some libraries added (.jar files) - these are required for the project to work. If the project is copied over to another computer will these .jar files need to be added again?

Member Avatar for jwenting
0
122
Member Avatar for NetroNeil

# Hey guys, I'm having a problem with trying to replace a string in funky.jar from a java program. # The string in funky.jar is called house. The default value of house = "brick". Is there a way I can code my java program to change funky.jar's string to maybe …

Member Avatar for stultuske
0
169
Member Avatar for erik.pierce1

I cannot for the life of me get my GUI to comeup with my deckPanel displayed along with my JButton that I intented to add an Action Listener to. THanks for looking. I am sure it has something to do with my object creation and method calls. import javax.swing.*; import …

Member Avatar for erik.pierce1
0
130
Member Avatar for lfcoats

I am having a problem completing my program. I am sure it is a simple mistake. My results look something like this How many students do you have? 2 How many Exam grades do you have? 4 Enter a score for student number: 1 98 Enter a score for student …

Member Avatar for lfcoats
0
1K
Member Avatar for jazz_vill

Hi I want to count the number of occurence of each characters in a string from a client then the server will compute the occurences and pass back to the client the result.You may have noticed that I used String for result coz im planning to send a string to …

Member Avatar for Reshma_2
0
2K
Member Avatar for ameer.mhmed

i want to make required field validator in java netbeans on textfield and press button if textfield null or example the textfield required string no integer how do it

Member Avatar for stultuske
0
297
Member Avatar for asif49

I'm trying to learn about ANNs. If anyone can tell me my understanding is correct that'd be fantastic. So if an ANN was to be used for an image classification task - white background with a black alphabetic character written on it. The inputs are each pixel. What I believe …

Member Avatar for Budy_1
0
189
Member Avatar for Richa_2

interface Interface1 { public int method1(); public int method2(); } public class Salary implements Interface1 { public static void main(String args[]) { int sa[]=Integer.parseInt(arg[0]); float pf,hra,da,tax,net; public int method1() { System.out.println("salary="+sa); try{ if(sa>250000) { pf=sa*5/100; hra=sa*10/100; da=sa*8/100; tax=sa*10/100; net=sa+tax; System.out.println("Net salary of an employee"+net); } } catch(Exception e) { System.out.println("I/O …

Member Avatar for Richa_2
0
299
Member Avatar for danie93
Member Avatar for rakchouh

Hi, I am writing the content of a long text file in pdf using PDFbox API in java but only half the page I am able to write please assit me with it asap here is my code: import java.io.IOException; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; import org.apache.pdfbox.pdmodel.font.PDType1Font; import org.apache.pdfbox.pdmodel.font.PDFont; …

0
113
Member Avatar for london-G

Hello, I am getting the error: "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:15" There is definetly something I am doing wrong but I cannot figure out what. Any help will be appreciated. The error in the output is poiinting to line 119; if(R[currentState][action] > -1){. I tried to change this but no …

Member Avatar for london-G
0
641
Member Avatar for d.sign

I need help regarding with the computation of what the user order it seems that the options doesn't have a value to be computed please help me how to put values in every options and one more thing is i need help with the codes for the checkbox for additional …

Member Avatar for stultuske
0
372
Member Avatar for Muni123

I am trying to add some text in to a page by using a textarea where text is entered the text gets saved in to a database after clicking on a add button on a page. However, I am unable to achieve this after trying. I have two tables matchreportcomments …

0
223
Member Avatar for oberle1515

Need to write a program that will print two patterns: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 and 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 …

Member Avatar for pritaeas
-1
475

The End.