32,204 Topics
| |
| My Applet is working but I have 2 issues, I cannot get away from the 'metal' plaf background (trying to make it all solid blue) and when the user clicks on the 1st text box I want the prompting text to clear for the user to type their own. No … |
I am wondering how extremely basic physics engines work and how I could implement them. lets say I have a player class (like a frame, except it holds the variables for the players), and I would like to add gravity. Could I go something like this [CODE] Player p = … | |
| Im writing the Applet GUI code that uses another class to translate a string into pig latin (dubbed PigLatin.class) My gui has two text areas, a few labels, and two buttons, but I'm having some trouble with event handling. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TxtCrypt extends JApplet … |
Hi everyone, I'm dealing with 2 messaging protocols: proto A and B. Their messages are described in XML: proto-A-messages.xml and proto-B-messages.xml Each message from proto A maps to one from proto B. When I receive a proto-A-message I want to map it to a proto-B-message. All I need to do … | |
[CODE] String SearchBroadCastMenu[] = new String[] {"Search Item Code", "Search Title", "Search Country of Origin", "Search Language", "Search Status", "Search Director", "Search Actor", "Search Producer", "Search Frequency", "Return To Previous"}; UIManager.put("OptionPane.messageFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18))); UIManager.put("OptionPane.messageForeground", java.awt.Color.blue); UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("Tw Cen MT Condensed",Font.PLAIN,18))); int SearchBroadCastOption = JOptionPane.showOptionDialog(null, … | |
Im trying to figure out why this simple piece of code isnt working. The aim is for the user to enter a word and then the application echos the word back to them. If the word is equal to 'done' then the application prints 'Complete'. [CODE]import java.util.*; public class word … | |
Dear Experts I want textbox1 to accept only numeric data as 55,65,698.00 Is there any easy way to validate textbox1 with javascript? Please help | |
I am stumped on how to go about coding my checkAttempt() method. Its supposed to check to see if the current row in int board is equal to int code as well as check each position and log how many numbers are in the correct position as well as present … | |
[B]here is the problem:[/B] -user enters "degree" and a "threshold" value -degree is converted to radians(with a static method) -computing the approximation as long as the absolute value of the series element is greater than the threshold [COLOR="Red"]series:[/COLOR] i.imgur.com/GRsIP.png -Error is computed as absolute difference of approximation and the value … | |
Hello, i have eclipse and in my laptop and i have a little problem when i call functions, example: when i create an button and i want to change size... [CODE]Button b = new Button();[/CODE] b.setSize([COLOR="Red"]arg0,arg1[/COLOR]); this is my problem, why eclipse show me as arg0, arg1 and not like … | |
| In the banking application, get customer Id, customer name and initial amount of 500. For further transaction and balance maintaining, the customer will enter amount and type of transaction. There are two types of transaction Deposit and Withdrawal for example: • If transaction type is Deposit Enter Amount to deposit: … |
I'm trying to read data from a text file that looks something like [CODE] United States 155981460 50.28 Indonesia 40829720 16.8 India 38045000 3.24 [/CODE] I need to add all the numbers after each country together. I also need to which country has the highest number in the third line … | |
Hello Im having some new Java problems, while trying to export my project to a JAR file in Eclipse. When I run it from the IDE its OK, all roses and bourbon, but I get hit over the head this when I run it from cmd : [CODE] C:\Users\Joey\Desktop>java -jar … | |
need help to add main class to test this program. [CODE]public class Rational { private int num; private int den; public Rational ( ) { num = 0; den = 1; } public Rational (int a, int B) { num = a; den = b; simplify ( ); } private … | |
[CODE]<%-- Document : index Created on : Dec 5, 2011, 10:44:50 PM Author : Orange --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>The Collection</title> </head> <body> <center> <%------------------Search-------------------------%> <form method="post" action="search.jsp">Please select the search parameter you want: <select name="SearchDB"> <option>Please select one</option> <option>Collectable</option> <option>Item Owned</option> … | |
I'm looking for a good book about Servlets and JSP for beginners. So far, the only book I know and have read is Head First Servlets & JSP, but it's focused more on the SCWCD exam rather than the specifics on building stuff. I'm looking for a book that has … | |
Hey guys! I created a dialog box the prompts the user to input a name. I want that name to be displayed in a textarea. How do I accomplish this? And is displaying it in a textarea right or do I use something else like say a textpane? Here's my … | |
please tell me that as i have learnt core java and i want to give SCJP which is coming in january? what exactly this exam is all about? how should i prepare for it? what is its value if i will pass this exam? please me all info about this. … | |
Hey everyone, I'm wondering why I can't print the values that are in the array. I'm passing an array to the method below and trying to print the result.. the compiler says that "ArrayIndexOutOfBoundsException" What's the problem really? [code] public static int[] treble(int[] nums){ for (int i=0; i <= nums.length; … | |
As some of you have read, Ive been working with JNI for these days. Ive found that JNA may be easier to manage and also allows some other things. I have this very simple program: The .cpp: [code] #include <stdio.h> #include "PruebasDeJNA.h" int suma(int a,int b) { return a+b; } … | |
im having trouble closing this class, ive been trying for 2 hours Its a huge collection of ifs [ICODE] package net.minecraft.src; import java.util.Random; import java.util.*; public class ItemTestItem extends Item { public int TimesShot; public ItemTestItem(int i) { super(i); maxStackSize = 1; setMaxDamage(50); } public void onUpdate(ItemStack itemstack, World world, … | |
private ArrayList<Employee> employee = new ArrayList<Employee>(); How do I write this attribute on a UML diagram? | |
Dear all . :) i have 2 classes which generate a key look like this one : Lg+jExclU6WUbd2bKF1OZay1A4vzMHff8Di2TLoBnTwvtmdzZQrq4JErJCJzurKlbNrIBs05q4wf5uTirLVREQ== the 1st class : import java.math.BigInteger; import java.security.KeyFactory; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.RSAPublicKeySpec; import javax.crypto.Cipher; import javax.crypto.NoSuchPaddingException; public final class c { public static String a(String paramString) { RSAPublicKeySpec localRSAPublicKeySpec = … | |
Using the file of sunset data, write a program using graphics that shows the sunset and sunrise. When I run the program, it says java.lang.NullPointerException. I want to know where I put the sunset data file. I am using eclipse. Here is my program: [CODE] import javax.swing.*; import java.io.*; import … | |
I'm wondering if there is a way to simplify this program. I feel like I wasted a lot of time on all the ternary codes at the bottom for labeling "bill" for the three values (ten$, five$, and one$). Also for deriving the values for q,d,n, and p I feel … | |
I am creating a project, which one start copy itself to any drive and stop execution and run other file which was copied.... No progress yet... Has any one done similar type of project before.... Need a bit for starting guidance.... Thank you. | |
I'm trying to create a word game in which a player must guess a secret word. Initially the secret word it showed as a series of underline characters corresponding to the length of the word to guess example: “pig” - - - When a letter entered by the player is … | |
i ahve to write a java program using method...the program uses a method to calculate the total cost to rent the business area.then it prints the result... the rent for 100 square feet tent is 100 per day...the user has o key in the square feet needed and the rent … | |
Hi all, I am looking for a shareware source code for a mortgage calculator to place on a WordPress website? Greatly appreciate your help. Thank you!!! | |
I have developed a Java GUI App.I want to connect that with mysql.I have already connected a seperate java file with mysql.That java class is also in the same package in my Netbeans project.I want to know is it possible connect DB by using that seperate java class? |
The End.