32,199 Topics

Member Avatar for
Member Avatar for authi

Methods: public class metod { public static String computation1 { JOptionPane.showMessageDialog(null," Area of a Circle"); String n = JOptionPane.showInputDialog(null,"Enter a Number"); int num = Integer.parseInt(n); int form1 = (3.14 * (num*2)); JOptionPane.showMessageDialog(null,"… is "+form1); } public static String computation2 { JOptionPane.showMessageDialog(null,"… of a Trapezoid"); String h = JOptionPane.showInputDialog(null,"Enter Height"); int …

Member Avatar for JamesCherrill
0
4K
Member Avatar for jackiewcc

What are the suitable software methodology can be used to develop an Instant Messenger application in Java? [B]An Offline LAN-based Office Messenger[/B] I got read about the Rapid Application Development! Is it the most suitable methodology?:-/

Member Avatar for JamesCherrill
-1
128
Member Avatar for chamnab
Member Avatar for ecclesiastes3:1

good day everyone... can you give me a code for mouse listener i really appreciate it example.... the mouse is moving right or left the image will follow the mouse here's the image.......

Member Avatar for Majestics
0
71
Member Avatar for stevanity

I made this simple program for a 2 player TiCTacToe game. But It doesnt seem to be working properly. I cant understand whats going wrong here! Please help... [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MainFrame extends JFrame { JButton [][] buttons= new JButton[3][3]; JTextField statusBar; GamePanel panel; Integer …

Member Avatar for stevanity
0
109
Member Avatar for Onlineshade

How to take input in a array in Java? my code is.... [CODE] String[] array=null; Scanner sc = new Scanner(System.in); System.out.println("How many Numbers:"); String r = sc.nextLine(); Scanner sc1 = new Scanner(System.in); System.out.println("Enter Number:"); for (int m = 0; m < r.length(); m++) array=sc1.next();[/CODE] I cant do this. Please help.

Member Avatar for Ezzaral
0
114
Member Avatar for lynnb86

I have my project done in NetBeans, and it runs fine with no errors. However, when I try to compile the main class it says : C:\Users\Lynn\Documents\NetBeansProjects\EmployeeInfo\src\employeeinfo>javac Emp loyeeInfo.java EmployeeInfo.java:35: cannot find symbol symbol : class Name location: class employeeinfo.EmployeeInfo Name saveInfo; ^ EmployeeInfo.java:83: cannot find symbol symbol : class …

Member Avatar for lynnb86
0
290
Member Avatar for maxypro

Hello Everyone, I`m New to java. I need to search a jtable when i`m typing in a jtext field.As an example if i`m serchin my jtable by customer id and in j table it has customer id`s like 10021 and 10022 when i have typed"1002" the jtable should show both …

Member Avatar for Onlineshade
0
182
Member Avatar for Majestics

I am starting this thread to gather some useful information before i start my work I am working on a project which takes user information and store it in database.. Now each user has seperate department's. I simply want to attach the user information to pre-configured outlook with department email.... …

Member Avatar for Onlineshade
0
175
Member Avatar for aldeene

why this code is not working?, error: non-static variable jTextField1 cannot be referenced from a static context [CODE]try{ Connection con = DriverManager.getConnection("jdbc:mysql://localhost/sample", "", ""); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT name FROM testtable"); while (rs.next()){ String n = rs.getString("name"); jTextField1.setText(n); } stmt.close(); con.close(); }catch(Exception e){ [/CODE]

Member Avatar for Onlineshade
0
1K
Member Avatar for 11684

Hi, I just started programming in Java, and now i tried to compile a file with the Mac Terminal (Command-line), but it did only give me an error which i couldn't explain, because this code did work in Eclipse compiler. Here's my code: [code="java"] class HelloWorldApp { public static void …

Member Avatar for 11684
0
261
Member Avatar for Nathan_11

How can i create a program wit the following problem: Input to numbers wherein the the next number is the sum of the previous two. Example: Input: Enter first number: 1 Enter second number: 2 Output: 1 3 4 7 11 18 29 47 76 123...

Member Avatar for Onlineshade
-2
102
Member Avatar for akasekaihime

I created a regform as a program but my problem is the total units is not displayed.....how can I make it compute the total units and display it........ here is the code that I made... [CODE]import java.io.*; public class regform { public static void main(String args[])throws IOException { BufferedReader br= …

Member Avatar for NormR1
0
153
Member Avatar for sim_pack

hello, is there a way to display a pdf file within a java application? can it be displayed as one of the elements in a panel? thanks..

Member Avatar for peter_budo
0
105
Member Avatar for ogollah

Can someone please help me to find an idea how you can develop image codec which can compress the raw format images of type ppm using two programs; one for the encoder and one for the decoder. using java? <-------Please------>

Member Avatar for peter_budo
0
31
Member Avatar for chiiqui

I am working on may code and I received a null pointer error , how do I fix this? all I wanted to do was remove the selected array here's my code [CODE] import java.util.Scanner; public class Game { public static void main(String args[]){ Scanner input = new Scanner( System.in …

Member Avatar for Majestics
0
240
Member Avatar for bert2385

ive already searched the threads... Plz help :( unable to access jarfile C:\Documents and Settings\staff\My Documents\fg8clients.jar

Member Avatar for thines01
0
48
Member Avatar for jjohnson33

[code]/*jesse johnson Help.java csc 110 August 25, 2004 */ import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Help extends JApplet implements ActionListener { // GUI Buttons JButton ifButton , ifElseButton , switchButton , whileButton , doWhileButton , forButton, clearArea; JTextArea output; JLabel statusBar; public void init() { Container container = …

Member Avatar for JamesCherrill
0
639
Member Avatar for Bozog

Hi PLEASE HELP I have a problem with my PDFBox API. I am currently getting a PDF Document and then I want to add a string at location 0,0, when i try to save it , it is not saving the changes and it remains as it is. The Following …

Member Avatar for Bozog
0
208
Member Avatar for slasherpunk

Isn't it better to use the BufferedReader function readLine() instead of read() or read(byte[])? The reason I ask is because of potential memory wastage by the read() function. If I specify a byte array of size 10, then it will become capable of accepting ten bytes from the transmitter. However, …

Member Avatar for Rameshwar Soni
0
201
Member Avatar for Duki

Is there a way in java to do something similar to this: [code=c++] class Rectangle { public: int x; string y; private: int a; string b; }[/code] Or do you always have to specify public/private for each property?

Member Avatar for harinath_2007
0
114
Member Avatar for Bobonoinc

I am new to Java and as an exercise I am trying to develop the following: 2 JPanels on a JFrame where 1 of the JPanels can be used for drawing. I started from an example from Daniweb from 2010 but can't seem to get a graphic context because the …

Member Avatar for Bobonoinc
0
1K
Member Avatar for JDoggieIII

I am attempting to use a WebBrowser control in C# to display a webpage. I would like my C# application to know when a Javascript function is called within the loaded webpage. Is there anyway to do this? I can't seem to find an event handler for it.

Member Avatar for JDoggieIII
0
381
Member Avatar for slyfox

Hi, Cosidering the following code ....i want to store the output values into an array.. can anyone pliz help......... import java.io.*; import abr.srw.*; public class Prime1 { // This method tests whether a given number is prime or not. public static boolean isPrime ( int num ) { boolean prime …

Member Avatar for Ezzaral
-1
220
Member Avatar for wiredin

I need to make 45 objects of a nested class within my main class. I have tried instantiating the objects inside the main class' data fields and then inside of its default constructor. After being instantiated, i need to add 15 of the objects to 15 more arrays (each object …

Member Avatar for NormR1
0
169
Member Avatar for Ephron

hi, I've got a really long String of bits, like: "0010101011101010011011011010100110101010110101..." And I want to chop it into pieces of eight and make bytes out of them, in an array. what would be a performant way to do this? Thanks Ephron

Member Avatar for Ephron
0
213
Member Avatar for coco24

I have this code and it works. It prints out the number, product, and sum, but I need it to be able to work with more than one number. For example if enter 45 6 70 I need it to say Numbers: 45 6 70 Sum: 121 Product: 18900 How …

Member Avatar for Onlineshade
0
151
Member Avatar for Bladtman242

Right, I wasn't sure whether to put this here or in the java forum (since I'm trying this in java) but in the end I figured it is probably a general coding question. Hope I got it right :) So, about object names :) I'm trying to do the c++ …

Member Avatar for Bladtman242
0
191
Member Avatar for dwayned

Hi, I have created a small appication to run a number of self extracting archives depending on the option selected. I have the program working and all is going to plan. At the moment my program calls the slef extracting zip by pointing to the location on the hard drive …

Member Avatar for dwayned
0
230
Member Avatar for binoman

I just try to calculate 5.3 - 5, and the answer is a bit off. this is the code: [CODE]double answer = 5.3 - 5; println("answer = " + answer);[/CODE] and the output is: "answer = 0.2999999999999998" instead of 0.3. I use Eclipse on win 7 32 bit as a …

Member Avatar for binoman
0
1K

The End.