Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
34% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
7
Posts with Downvotes
6
Downvoting Members
5
3 Commented Posts
0 Endorsements
Ranked #818
~26.3K People Reached

36 Posted Topics

Member Avatar for jrosh

Please make it clear of what exactly you want to do in a database? Do you want to search the productname, or expirydate etc. If you can make it clear then I can help you out Regards Sincerelibran [QUOTE=jrosh;1005686]Please any one can guide me how to write a [B] mysql …

Member Avatar for Sardar_1
0
2K
Member Avatar for sincerelibran

Dear Friends, I have a frame which is a JSplitPane which is split horizontally into two. On the upper half I want a JFrame to appear and on the lower half I want a JTable to appear. I tired but couldn't get the answer correctly. Will anyone be able to …

Member Avatar for jouj
-1
745
Member Avatar for bullockc83

Applets are small applications that are accessed on an Internet Server, transported Internet, automatically installed, and run as part of a Web document. Applet is a program written in Java and included or embedded in an HTML page. An applet is automatically loaded and executed when you open a web …

Member Avatar for javanoob101
-1
126
Member Avatar for javanew

You have to consider how many dentists are there and store the details of them. You have to allocate different slots for the dentist and assign a patient to each slot. You have to store the details of the patients and also the history of treatment. Generate reports according to …

Member Avatar for Ezzaral
0
483
Member Avatar for PadmeTraner

Please try this code [CODE] import static java.lang.System.out; import java.util.Scanner; public class ReadMain { public static void main(String[] args){ int moneyEarned = 0; Scanner myScanner = new Scanner(System.in); System.out.println("Please Enter Money Earned Tutoring"); int userEnteredMoney = myScanner.nextInt(); moneyEarned = moneyEarned + userEnteredMoney ; System.out.println("15" + " hours and " + …

Member Avatar for sincerelibran
0
152
Member Avatar for erogol

Please try this code. It is working fine and will give you the desired result. [CODE] public class AddSample{ public static void main(String args[]){ int asd = 13; int dfg = 24; double result = 0.0; result = (double)asd/dfg; System.out.println(result); } } [/CODE]

Member Avatar for sincerelibran
0
105
Member Avatar for Slyvr

You have declared the object for the Inventory class. But you have not allocated the memory for it. So you have to write that statement explicitly. [CODE] Inventory inventory; inventory = new Inventory(); JTextField txtMoney = new JFormattedTextField(inventory.getInvWallet()); [/CODE] Hope this will work fine for you. Try it out and …

Member Avatar for Slyvr
0
106
Member Avatar for musikluver4

Hope this will solve your problem. I'm giving you the code of two programs (frames). First one id the MainFrame. When you click the button on this MainFrame it will take you to another Frame name MainMenu. Try this out This is the code for MainFrame.java [CODE]import java.awt.*; import javax.swing.*; …

Member Avatar for musikluver4
0
5K
Member Avatar for andyhunter

The code is working fine as everyone said. The problem is with the message you have given within the do while loop. When you enter 999 the loop is working fine and is giving you the desired output which is "You must enter a house number between 1 and 1000". …

Member Avatar for sincerelibran
-1
117
Member Avatar for Crono

Is this what you are looking for? [CODE] import java.util.Scanner; public class Fibonacci { public static void main(String[] args) { int fib; int n; Scanner scan = new Scanner(System.in); System.out.println("input a number"); n = scan.nextInt(); System.out.println(calcFib(n)); } public static int calcFib (int n) { int ans; if (n<2) { ans …

Member Avatar for sincerelibran
0
262
Member Avatar for kchadek

Please try this code. Compile the program in the command prompt using javac Palindrome.java and run the program by giving java Palindrome 121 in the command prompt. Hope this will work fine for you. If there is any change kindly let me know. [CODE]public class Palindrome { private int num; …

Member Avatar for kchadek
0
103
Member Avatar for jems5

Here the problem is with setting the limits for the condition of the if statements [CODE]if((OccupantsInput > MAX_OCCUPANTS) || (OccupantsInput < 0)){ System.out.println("Occupancy limit was exceeded"); } [/CODE] Hope this code will work perfectly.

Member Avatar for dangari
0
146
Member Avatar for AGU.Jessica

kindly make the following changes in your code. [code]</style></head><body>[B]<center>[/B][/code] and in the first table include [code]<table cellpadding="0" cellspacing="0" border="0" class="style4" [B]align="center"[/B]>[/code]. The center tag has to be closed before the end of the body tag. You have to give center align to both. Then the text will be aligned almost …

Member Avatar for charlesying
0
406
Member Avatar for BlueCharge

For each cell in htm table that you use you have to specify the alignment. Otherwise it'll surely look different in different browsers. In IE the default alignment is "center" and in Firefox the alignment is "left". So if you won't specify any alignment for each cell it'll look surely …

Member Avatar for diafol
0
99
Member Avatar for lrolsto1

You have to set the classpath correctly to execute your program. in the command prompt or in the editor that you use, please set the classpath. In command prompt you can set the classpath like this: [code]set classpath=%classpath%;.;D:\java\programs;[/code] where D: is the drive in which the programs are stored and …

Member Avatar for Ezzaral
0
93
Member Avatar for Alex_

Please try this code after the statement [code]body.close();[/code] . The statement is [code]setDefaultCloseOperation(EXIT_ON_CLOSE)[/code];

Member Avatar for Alex_
0
2K
Member Avatar for keny2020j

Dear Friend, the data source name is 'lib' which you have specified in the String url. You have to create that data source name from the control panel. The steps are: Open Control Panel > Administrative Tools > Data Sources (ODBC) > Click Add button there > Select the driver …

Member Avatar for keny2020j
0
216
Member Avatar for ctsarsh

when i convert my java code to java applet code, there is no error, but when i run the code, the command prompt display Exeption in thread "main" java.lang.NoSuchMethodError: main This exception occurs because the classpath is not set to the current directory of yours. Yuo can set the classpath …

Member Avatar for masijade
0
182
Member Avatar for Dmith

[code]public class Person { public String Name; public String SocialSecurityNumber; public String PhoneNumber; public Person(String name, String socialSecurityNumber, String phoneNumber) { Name = name; SocialSecurityNumber = socialSecurityNumber; PhoneNumber = phoneNumber; } @Override public boolean equals(Object compareObj) { if (this == compareObj) // Are they exactly the same instance? return true; …

Member Avatar for javaAddict
0
105
Member Avatar for Stefano Mtangoo

You can write any number of classes in a single Java program. Suppose I've written three classes A, B and C in the same java file. Then any one of these classes will have the main method. Suppose class C has the main method inside it. Then the name of …

Member Avatar for kvprajapati
0
139
Member Avatar for JuneM
Member Avatar for sincerelibran
0
216
Member Avatar for laelzio.mosca

[CODE]import java.awt.Graphics; import javax.swing.JApplet; class WelcomeApplet extends JApplet { public void paint (Graphics g) { super.paint (g); g.drawString ("Welcome to Java Programming!", 25, 25); } }[/CODE] [CODE]<html> <applet code="WelcomeApplet" width="300" height="45"></applet> </html>[/CODE] The above html code works fine. For viewing the output of the above applet you have to create …

Member Avatar for sincerelibran
0
86
Member Avatar for JuneM

First of all, an Applet doesn't have a main method. You have to remove that main method and must write that windowClosing() event within actoinPerformed(). Hope when you remove the main method almost half of your problem will be solved. Please do it and let me know the error you …

Member Avatar for sincerelibran
0
405
Member Avatar for gaya88

The print method is a pre-defined method in Java. There is the println() method and the print() method. This is a static method of the PrintWriter class. Its better if you change the name of that method and try. If you have to use print() method compulsorily then you have …

Member Avatar for PopeJareth
0
165
Member Avatar for kathmartir

use this MainProgram mp = new MainProgram(); mp.setVisible(false); This way you can hide the MainProgram JFrame. Don't think of disposing it. This is another alternative. Regards Sincerelibran [QUOTE=kathmartir;1005922]I have a problem with the dispose method. . .I got 3 java files with a class name: MainProgram.java MainPanel.java PageOne.java The MainProgram …

Member Avatar for FriQenstein
0
5K
Member Avatar for kat1

import java.io.Writer; import java.io.PrintWriter; Try this Regards Sincerelibran [QUOTE=kat1;1005702]I am using java.io package in my j2me programe in order to use PrintWriter but package does not show PrintWriter option nor it shows BufferedReader option , why this happen ??i do not know.if any one knows the solution plz tell me.is …

Member Avatar for sincerelibran
0
111
Member Avatar for abu taher

use distinct select distinct vFirstName from User where vFirstName is the attribute/field and User is the table name

Member Avatar for johnly
0
99
Member Avatar for iamwa

Use Java Swing for developing the web browser. You have to compulsorily use Threads. In order to perform multithreading it is very much needed. Remember we can do more than one task at a time using the browser. So if it has to happen you have to use threads. Use …

Member Avatar for saggy4
0
111
Member Avatar for davidnorth
Member Avatar for davidnorth
0
565
Member Avatar for anusha88
Member Avatar for kvprajapati
0
317
Member Avatar for sgsawant

[QUOTE=sgsawant;908448][COLOR="Red"]The program is given at the bottom[/COLOR] To compile java programs in the command prompt I use the following command: C:\jtemp\MyPack>javac AccountBalance.java -d . Only then are the classes compiled and I am able to run the main() function. When I execute the above command a folder "MyPack" is created …

Member Avatar for sgsawant
0
415
Member Avatar for JChakra

> Dear mates, I am am frustrated and bored to learn how to get or calculate coordinates data for Java Graphic API. > > for ex the GeneralPath 's function curveTo() takes 6 parameters namely x1,y2,x2,y2,x3,y3.I put some random coordinates data > into these function and got a crap drawing. …

Member Avatar for JChakra
0
201
Member Avatar for PatrixCR

> Hi. I'm new to java programming. I have some questions: > > 1) Does every java source code's [B]class name[/B] (the name after the [I]class[/I] keyword, e.g. [I]class[/I] [B][I]Hello[/I][/B]) has to be started with an uppercase character? > > 2) Does the java source code's **file name** (e.g. **Hello**.java) …

Member Avatar for sincerelibran
0
320
Member Avatar for sowmyask7

Dear Friend, this error can be due to the difference in data type of the column name and the data you're passing. The data type doesn't match. Maybe in the database the Field is defined as type integer and you've passed String value to it. Anyway the error is due …

Member Avatar for sincerelibran
0
5K
Member Avatar for redmaverick

Dear Friend, you have to use import java.text.*; since the Format and DateFormat are a part of java.text package. If you do that you won't get any error message.

Member Avatar for redmaverick
-1
289
Member Avatar for redZERO

[QUOTE=redZERO;821681]I was wondering do all programs have a unnamed thread by default? For example, if i have a very basic program, can i put Thread.sleep(int) anywhere in it and it will make the program sleep for a set amount of time?[/QUOTE] Every program has a default thread, a single sequential …

Member Avatar for redZERO
0
102

The End.