32,199 Topics
| |
I was writing this simple loop and it's giving me trouble. It's supposed to count through the permutations in a deck, so Suit is supposed to go as high as Suit: 3 and Rank is supposed to go as high as Rank: 12, but it isn't doing that. My program … | |
how to store MySQL table data into file and then again from file to table using java program. | |
Hi guys. I just having a little problem about creating a good console GUI for our homework. My program is just a simple shopping cart program where in we were asked to create a GUI that asks for the user if he is either a ADMIN user or a CLERK … | |
i have to store msgs of string type in a file in java.how do i distinguish between 2 msgs.and how shud i delete the first msg in the file. for eg: "My name is abc.I am fbvnfdl.I am a girl." is stored in a file. and "My name is abc.I … | |
Working on this program that uses 2 classes and a client program to test them, I keep getting this error pointing at my constructor, not sure what i am doing wrong but could use some assistance if anyone is able to offer, the error i am getting is: cannot find … | |
package class import java.io.*; import java.lang.*; import java.util.*; package Yo public class C { String s,f,d; C(String s,String f,String d) { this.f=f; this.s=s; this.d=d; } void displayj() { System.out.println("1st arg passed:"+" "+s); System.out.println("2nd arg passed:"+" "+f); System.out.println("single arg const:"+" "+d); } } main class import java.lang.*; import java.io.*; import java.util.*; … | |
Hi. im kinda new here . i just want some help with this code i cant seem to figure out my problem, i already declared a constructor but it keeps on saying cannot find symbol when i compile it -_- import javax.swing.JOptionPane; import java.io.*; public class Sample_Thread { public static … | |
| I like coding, though I'm really stupid, and not very good at it. I'm having trouble figuring out how to remove spaces from a String. I'm such a noobie.. if anyone wants to take a few min to educate me i'd appreciate it. The thing i was attempting to do … |
I'm having some trouble using getClientproperty() to get a string value btw, im using java 1.4.2, so no autoboxing I know how to get int values, and here is an example, which works perfect in my program, [CODE] cx = ((Integer) btn.getClientProperty ("cx")).intValue (); [/CODE] but when i try to … | |
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package progressbar; /** * * @author DEBASISH */ import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.event.ActionEvent; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class Progressbar { JProgressBar jprogressbar=new JProgressBar(); JButton jbutton=new JButton("Retrieve information"); … | |
Is exception handling useful in compile time errors logical errors and even runtime errors? | |
Hello, I'm a beginner at Java and trying to get to know programming and one day work my way up developing android apps. Well I was trying make this program that would read in data from a txt file like this: [img]http://i42.tinypic.com/2vvkokj.png[/img] I wanted the firstname, lastname, id# and dob … | |
I need help!!! im trying to get my sentinal to stop counting as my last value passed. Im imputting a value for a house,and its calculating a total price based on interest and stuff ive set up according to the house value. then pressing -1 to go onto the next … | |
Hi I'm trying to create an array of objects and then put a different value into each object. Problem is, I don't know why this isn't working. [CODE=java] public class TestProg2{ public static void main(String args[]){ Rank rank= new Rank(); } } class Rank{ private static int rankIndex=0; public Rank(int … | |
[CODE]public final class SavingsAccount implements Serializable { /** * This constructor requires all fields to be passed as parameters. * * @param aFirstName contains only letters, spaces, and apostrophes. * @param aLastName contains only letters, spaces, and apostrophes. * @param aAccountNumber is non-negative. * @param aDateOpened has a non-negative number … | |
hey guys, I need a way to ftp a file from a server however i dont want to ftp all the files as there are some files that exceed 200mb what i need is to ftp a part of the file. in other words i would grep for a string … | |
Hi... i m making script which is checking that username aur password is true or not..... i want to show alert if username or password is incorrect.then i want to redirect my page to original login page.... my code is [CODE]$alert = "<script type=\"text/javascript\">alert('Invalid UserName or Password');</script>"; echo $alert; header("Location:../Admin.php"); … | |
hello.i have a homework in java wich asks to create this program: there would be n persons who are going to rate songs. for n persons we will ask their name,surname,sex and age.after this each person will rate(vote) with points the song we have given to them.there are 15 songs … | |
#include<iostream> #include<conio.h> using namespace std; struct biodata { string fname; string lname; string mname; string address; string pbirth; string dbirth; string religion; string citizen; string civilstat; string gender; string email; }*student; main( ) { int n,i,xx,c,d,a=0,e=1; char b,y; cout<<"how many records?"; cin>>n; cin.ignore( ); student= new biodata[n]; for(i=0;i<n;i++) { cout<<"\nLast … | |
[CODE]import java.lang.*; import java.io.*; import java.util.*; interface Batm { final static int minbal=500; abstract void withdrawl(); } class Bal implements Batm { int amt,cbal; Bal(int amt,int cbal) { this.amt=amt; this.cbal=cbal; } void withdrawl() { if(cbal>minbal) { cbal=cbal-amt; System.out.println(amt+" "+"withdrawn"); } else { System.out.println("bal nt sufficient"); } } } class Atm … | |
bonjour, j'ai un probléme de compilation concernant un projet,malgré que j'ai un main class voici les erreurs: run: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at com.anthonyeden.lib.util.XArrayList.<clinit>(XArrayList.java:86) at com.anthonyeden.jnm.JNM.<clinit>(JNM.java:174) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more Could not find the main class: … | |
hey guys, i need to create an application which would allow me to log on to ssh server and would allow me to use linux commands in the application, not necessarily all commands, but the main ones such as cd, ls, grep. please let me know where i can start … | |
when i run my source code on winows xp then progress bar work fine but on linux it just stuck and not run at all, My Code is as follows [CODE]import java.sql.Connection; import java.sql.Statement; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.sql.DriverManager; import java.text.DateFormat; … | |
Hi, I am trying to add buttons to a Panel which is located on JFrame after the JFrame has been set to visible. My aim is to be able to click "File --> Load" then have it loop through a folder of images, creating buttons which have the images on … | |
Hi folks. I have a java application which plays a audio file . SO before the audio file or sound is played by my java application , i want to mute all other application sounds like Windows media player , VLC player (etc) if those are currently playing at that … | |
| |
In linux whenever i run my gui java programe it does not show Image My Code Is As Follows look at line 77. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; class bank implements ActionListener { JFrame mainframe; JMenuBar mbar; JMenu file,view,help,edit; JMenuItem newacc,exit,login,helpcontent,cust_detail,emp_detail,delEmp,delCust,addEmp; public bank() { mainframe=new JFrame("Bank Application"); try … | |
how to set up frame such that user cannot click other side than the current active frame if click then frame prompt for actvation. Thankx in advanced. | |
What is difference between transaction of saving account and current account? I Am New Please Help Me. Thanks .:$ |
The End.