35,618 Topics
![]() | |
is possible to work of return statement with Math Class? eg, [CODE]return Math.pow(2,2);[/CODE] | |
Hello I have a problem how to make custom defined text area it's similar to text area which you can create in Photoshop while you wan't type any text. Is it possible to do it in swing ? | |
Hello good day to all... is there anyone can help or suggest me how my code work successfully. Actually the code was working well, but i wanted to change it`s content to GUI form. the program description was the user must input a word/String and shuffle/scramble the word that the … | |
So my title was meant to be array not loop I need to create an application that will generate random spots so far my work is this [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.util.Random; public class Shape{ private int x; private int y; private int width; private … | |
Okay so I have read the guidelines and don't believe this post is against the rules or against the rules for asking for help because I have put in an effort and I'm around 70 percent in testing the files. I just need help with this basic Java code to … | |
This is the assignment: TIP CALCULATOR Create a class called TipCalculator which calculates a tip amount based on a grade of service received. calculateTip method Create a method named calculateTip which accepts two incoming parameters: a double and a String. The first parameter (the double) contains the bill total, and … | |
hy! i am designing game in JAVA as my university project, i want to make myself unique by doing something different ---soo i though of making iphone game that runs java...I designed the iphone app, which is just a icon and few other things...when u click nothing happens but i … | |
Hello, I have recently joined a orgainization as a [B]Java Engineer Trainee([/B]0 Years of Experience) and working on a project(80% ABAP people are working on project) in mainteance from last 2-3 Years. The Work in the project is of basically in ABAP and [B]Core Java[/B] (Only Basic Java code is … | |
![]() | [COLOR="gray"][/COLOR]1. your-netid_hw5_1.java : Liang page 253, programming exercise 7.6. (Multiplying two matrices) Write a method to multiply two matrices. The header of the method is as follows: public static double[][] multiplyMatrix(double[][] a, double[][] b) To multiply matrix a by matrix b, the number of columns in a must be the … |
[TEXT]I'm trying to write an application that will input five numbers from the user. The program should print out the largest and smallest numbers. It should print how many of the numbers are two digit and how many of the numbers are three digit. It should also print out the … | |
as we know the code of scanner is like this, [CODE] ... Scanner scan = new Scanner(System.in); System.out.print("something is something: "); [COLOR="Red"][type] [variable name] = scan.next();[/COLOR]... [/CODE] so here is my problem, how can we scan char type? | |
Is there an easy to use tool that OPs could use to find variable's whose class level definitions are Shadowed by local definitions of variables with the same name. I see that problem a couple of times a week. Do the standard IDEs have options that would warn about the … | |
Hi, Am setting a value in request objet like this: [icode]request.setAtttribute("Hello","true");[/icode] Now i am redirecting to the action class: [icode]new RedirectingActionForward(request, url.getInwardRedirectURL());[/icode] In the redirected action class, am using this to retrieve value from request object: [icode]String example = request.getAttribute("hello").toString();[/icode] Am getting nullpointerexception.. Could anyone help me on this..!! | |
Hi all, I am learning j2ee with the help of this forum . First thanks for all of your replies realy that makes me to know more things . Now i have doubt, i don't know whether it is silly or not . How does RequestDispatcher works? I know it … | |
hi everyone, Am doing project for profit and loss account,I need to display daily expediences in graph format for that am using jquery bar graph its working separately when i integrate its not working properly. i used the following code for forward .. [CODE] request.setAttribute("listvalue", list); RequestDispatcher dispatcher = request.getRequestDispatcher("/ViewProfitLoss.jsp"); … | |
I am trying to build an animation. It just has two pictures or scenes. I want it to start at one picture and end at another. When I run my project all I see is a blank screen. I have checked and made sure that my Image paths are correct. … | |
Hi, I am new to Java and just learning GUI's. I was wondering if someone could help me with a project? I am trying to create a questionnaire. It will was the user a question and have radio button answers. After the answer is selected, they will hit the "next" … | |
An emirp (prime spelled backwards) is a prime number that results in a different prime when its digits are reversed.[1] This definition excludes the related palindromic primes. Emirps are also called reversible primes. this are the list of emirps [url]http://oeis.org/A006567/list[/url] [CODE] public class EmirpProgram { public static void main(String args[]){ … | |
I happen to read the following code segment from Thinking in Java [CODE]public class PetCount3 { static class PetCounter extends LinkedHashMap<Class<? extends Pet>,Integer> { public PetCounter() { super(MapData.map(LiteralPetCreator.allTypes, 0)); } public void count(Pet pet) { // Class.isInstance() eliminates instanceofs: for(Map.Entry<Class<? extends Pet>,Integer> pair : entrySet()) if(pair.getKey().isInstance(pet)) put(pair.getKey(), pair.getValue() + 1); … | |
Hi Guys, I have a entry that uses keyboard.nextInt() is there a way to limit what it accepts and if its not right return a text string? I have tried using If and else statements for some reason they don't seem to be working. Any ideas? | |
[CODE]try { dataFile = args[0]; } catch (Exception e) { System.out.println("The file was not found. Please input file name now: "); dataFile = scan.nextLine(); }[/CODE] This gets a file name from the command line, and if no file is specified it asks the user to input a file name, however, … | |
hey guys i need java code that would convert .csv files to .xls. has anyone got any examples or anything similar? any help will be appreciated. thanks | |
I am attaching my complete code, which I was currently developing. I am not able to get why doesn't my KeyListener work. None of the KeyListener events are fires on pressing the keyboard. Please have a look and tell me the flaws in my code [ATTACH]22414[/ATTACH] | |
Hi, im trying to move an object that moves only with the user input. For example if i type in 45, it will move 45 spaces. How would I go about doing that? Thank you for your time. | |
please help me... i will make Family Feud game in java... i dont know how will i start my project... T_T.. please help... give me some ideas... please... | |
Can anyone help me to get the estimate value of float value 1001.27124 to 1001.27? Math.round(float) function return the int value. But I want to get float value result with 2 decimal point; Thanks in advance. | |
Hi ! To improve my java programming skills i like to write a really fancy fib. nr. calculator. Did it in C using memory allocation methods and hot to 1M digits in ~10min. So something like Step-Up challenge. The only thing as far as i can see limits my progress … | |
Trying to read a list of numbers in from the arraylist, and stick em into a matrix of int[][] int[][] board; board = new int[row][col]; ArrayList<Integer> temp = new ArrayList<Integer>(); so those are my two variables, and i have a for loop with variables, i and j...so I am trying … | |
First off, I am a Java Noob coding in latest version of NetBeans. I am trying to create a program the will allow the user to enter two decimal values: time and earnings in a swing GUI. [B]Basic Flow[/B] [LIST=1] [*]The user will enter the values in two different text … | |
hai guys, see for example i have 15 banks details to print as pdf. but i wanted it to be printed only 6 banks per page. i have to get 3 pages for this 15 banks as 1-6 , 6-12, 12-15 respectively. Give me the suggestions to do it. |
The End.