35,618 Topics
![]() | |
Hello everyone, I am working on a program right now and part of the idea involves a pop-up menu. What I need is something like: A small box in the program, On MouseOver small box, small pop-up menu opens up next to the small box, On MouseOver menu option 1, … | |
I am working on an assignment that calls upon a text file to read numbers line by line. If line 1 number is 1, it looks at line 2 number (ex, line 2 = 13), and uses OneNumber class file to do various methods (such as prime or not prime). … | |
How do I change a component that is called in a different class? for example i have added a button on a jframe then called the frame, then in another class how can i change the setVisibilty of the button that was called in the other class? | |
Does anyone know how to insert a .jpeg into the JPanel of a GUI window? | |
Please am new to Java as a language and I want to use it my Bsc project what do I do? | |
Hi, I am beginner in java programming. I want to create a program that will enable the user to input data? I want to check if the input is numeric or not. How to do it? thanks!!! | |
Tried running ant on some example source and keep getting this error.. Does anyone know as I'm assuming i'm maybe missing the ejb libs but am pointing to the glassfish/jdk which should have them? I also thought JSE compiles JEE code? thanks. [CODE]Z:\My Desktop\ejb3-samples\chapter1>ant Buildfile: Z:\My Desktop\ejb3-samples\chapter1\build.xml common: [echo] BuildName: … | |
Hi all Am trying to Truncate the end of a linear list in java. so that: [CODE] // reduce the size of the list to s by removing all elements // with indices greater or equal to s; return the number of removed // elements; // for example, if the … | |
i am begineer in java and i want to know what are the fields in java and for what they are used??? plz explain in detail | |
Hi, I am writing a code to get pixels value of the entire image and store it into a array. But i am facing the problems, as outlined below. I would be grateful if someone could help me in sorting this out.. Cheers :) [code=syntax] File inputFile = new File("one.jpg"); … | |
hey, i am using the value returned from the accelerometer. it returns me the "roll" value which is between -180 to 180 that adds up to 360. what i want to do is just simply produce this on the screen by drawing a line (g1.drawLine();) that would rotate in the … | |
![]() | I would like to modify this program so that it also prints out the location of the element in the array that contains the maximum, so in System.out.println("The maximum is " + maximum ); it will be more like -- System.out.println("The maximum is " + maximum + "its location is … ![]() |
our assignment is we are going to create a calculator(console based) in JAVA but my problem is how could I make equal sign as a terminator.. for example i'll add 5+10. if i press equal.. the answer will come out instead of pressing enter key.. | |
I am getting an Error that Glassfish server starts fails.....I dont knw why? Here is my server file.. Mar 4, 2011 5:57:08 PM com.sun.enterprise.glassfish.bootstrap.ASMain main Welcome to Felix ================ INFO: Launching GlassFish on Felix platform INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: Starting Grizzly Framework 1.9.18-o - … | |
I have a question about programming Java into HTML using the latest version of Tomcat. I'm trying to get the option values from the HTML to go inside the Java program and print out said values. A friend of mine suggested that I create an array of strings and then … | |
C:\My Documents\sprayproject.java:100: <identifier> expected JOptionPane.showMessageDialog("\nTotal fees charged: R"+total+"\nCost exceeding R3000: "+count); ^ 1 error Guys please assist me in rectifying the above error? Following below is my coding... import javax.swing.*; public class sprayproject { public static void main(String[]args) { String name, temp, temp2; int option, acres, farmno, count=0; double cost, … | |
Hy, I have a JPanel within a JFrame. In the menu bar of the frame I have a check button that would show/hide a toolbar within the JPanel. The toolbar is a JToolBar type and is added in the NORTH region of the layout. It occupies the whole region but … | |
hey, i receive one value from an accelerometer that shows the roll of the accelerometer the value ranges from-180 to 180 which is 360 degree angel. what i want is to represent this value on the screen by drawing a line that would rotate accordingly to my accelerometer. this video … | |
Hello, I'm really confused.. If I have a string in Java, let's say "Phillip" and I wanted to store this in an array... e.g. [code] name[] = { "P", "H", "I", "L", "L", "I", "P } [/code] would I use a for loop for the string? Helo? | |
I am getting Error: Jasper Exception for "com.microsoft.jdbc.sqlserver.SQLServerDriver" I have included sqljdbc4.jar in lib folder of tomcat serve bt still getting an error I dont know where to place sqljdbc4.jar...i am getting an error..so plz help me | |
this is the code for my class assignment [code=c] import java.util.Calendar; class ClockThread implements Runnable,KeyListner{ int sec,min,hour; Thread thr; ClockThread(){ Calendar rightNow = Calendar.getInstance(); hour=rightNow.get(Calendar.HOUR); min=rightNow.get(Calendar.MINUTE); sec=rightNow.get(Calendar.SECOND); thr=new Thread(this); thr.start(); } public void run(){ while(true){ try{ Thread.sleep(1000); sec++; } catch(InterruptedException ie){ System.out.println(ie); } if(sec>=59){ sec=0; min++; } if(min>=59){ min=0; hour++; … | |
hi~ i am a beginner of using Javascript.I am doing a project. The project needs: 1.creat a textbox to let the user input their mark. 2.creat a second textbox and a button 3.after enter a mark in the first box and click the button,the second textbox show the grade That … | |
[CODE] import java.io.*; import java.util.Date; public abstract class Customer { //super class customer String customerName; String customerID; String customerAdd; String customerPhone; String dateOfMembership; public Customer(String name, String id, String add, String phone, String date) { //constructor this.customerName = name; this.customerID = id; this.customerAdd = add; this.customerPhone = phone; this.dateOfMembership = … | |
I want to create checkbox inside drop down list box using swings pls some one help me | |
I'm practice to make a program that calculate total value of five products. I want the user can keep input the quantities of one of the five product without return the main menu. So I create a while loop to solve the problems. But the problem I have now, how … | |
Hi I am supposed to modify class employee to implement interface Payable(another class) and declare method getPaymentAmount to invoke method earnings. Method getPaymentAmount would then be inherited by the subclasses in the Employee hierarchy. When getPaymentAmount is called for a particular subclass object, it polymorphically invokes the appropriate earnings method … | |
Everything about this code works fine, except the while loop won't end, even when the strings are perfectly matched. Help, please? [CODE]import java.util.Scanner; public class SecretPhrase { public static void main(String[] args) { System.out.println("Congratulations! You won! Thanks for playing!"); } } [/CODE] | |
Hi, I'm currently designing a software application for teaching, it will have a large backend database, short animation videos(basic 2d of people talkin). I'm just looking for some advice in what is the best language to code this type of project in. I have done several projects in both java … | |
I am having some trouble with the coding for the api. games4j.com has all of the codes and files, but when I insert the api codes into my doe I get an error. Please help me. I am getting the error with these two lines [CODE]loggedIn = Highscore.isLoggedIn(applet);[/CODE] and [CODE]Highscore.save(applet, … | |
hey, i have a for loop that is infinite, it runs till i terminate the program. inside of the loop there is a value(lets call it X) that keeps on changing all the time till i terminate the program. when the program is executed i want to store the first … |
The End.