35,617 Topics
![]() | |
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) … | |
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 … | |
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: " + … | |
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 … | |
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 | |
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 … | |
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); // … | |
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 | |
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 … | |
/* * 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 … | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
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 … | |
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? | |
# 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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … ![]() | |
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 … | |
How to play mp3 files in java using eclipse? | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.