32,204 Topics

Member Avatar for
Member Avatar for kay19

Hello, having a hard time using my Faculty class, where I have to initialize/createObject from my Education class to Faculty. I would like to use the constructors from the Education class, to be implemented to my Faculty class. Here is my attempt Here's my two codes. public class Education { …

Member Avatar for JamesCherrill
0
296
Member Avatar for stanislav.koshutin

Please help to complete beginner in programming. I work with binary stack of 2 pictures and here is the plugin I use: import ij.*; import ij.plugin.filter.PlugInFilter; import ij.process.*; import java.awt.*; protected ImageStack stack; public int setup(String arg, ImagePlus imp) { stack =imp.getStack(); return DOES_8G+STACK_REQUIRED; } public void run(ImageProcessor ip) { …

Member Avatar for JamesCherrill
0
232
Member Avatar for yi625

con = Connect.ConnectDB(); String sql = "insert into table1 (" +"StudentID," +"FirstName," +"LastName," +"Contact Number," +"E-mail address," +"CarNumber)" + "values("+txtid.getText()+ ",'"+txtname.getText()+"','"+txtlast.getText()+"','"+txtnumber.getText()+"','"+txtemail.getText()+"','"+txtcarno.getText()+"')" ; try{ pst = con.prepareStatement(sql); pst.execute(); JOptionPane.showMessageDialog(null, "Saved"); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } can any one help me with this? im getting syntax error in insert into statement …

Member Avatar for silvercats
0
830
Member Avatar for Hanamantagouda
Member Avatar for xXFalcoPunchXX

I need help in building a binary tree and putting integers in it. I need to write an add method in my MyArrayBinaryTree class (that extends ArrayBinaryTree) that allows me to place the element to be added in the very next available slot in the array. I also need to …

Member Avatar for JamesCherrill
0
362
Member Avatar for rajeshwarreddyt

Hi Folks, I want to use windows authentication for java application for eaxmple: I have a application called ABC , now i want to apply windows authentication for this ABC appliation like when user hit the application URL the user should login automatically with out prompting any user name and …

Member Avatar for stultuske
0
1K
Member Avatar for techxaidz

I am currently having difficulty in testing a condition if a certain button do not have a text on it. For example i have a button in an array named btn[] and a textview(JLabel) named "tv", if i execute this code, nothing happened. if(btn[1].getText().toString().isEmpty()){ tv.setText("Okay"); } i also tried these …

Member Avatar for stultuske
0
166
Member Avatar for Seswing142

I am supposed to get the first and the last word from a string that is input by a user but im not sure how. Any tips would be great! //Print the first word and last word from a string int index = inputString.indexOf(" "); String fistString = inputString.substring(0, index); …

Member Avatar for stultuske
0
8K
Member Avatar for irtza

This program takes a number from the user and then using loop, modulo and division operator split the number into digits. as: import java.util.Scanner; class Split_num { public static void main ( String [] args) { Scanner a = new Scanner (System.in); int num, n, r; System.out.print ("Enter a number: …

Member Avatar for jwenting
0
612
Member Avatar for NajwaMY

I want to enter a data from the text field to my database named project marking. When I compile the java program seems there's no errors but when I click on the Calculate Button the data won't enter into the database. This is the partial code I didn't finished it …

Member Avatar for JamesCherrill
0
191
Member Avatar for android_gl

how to test if a num is a square root? ex: 9 is square root 3 is not square root ///////////////////////////////////////////// //do not worry about sytax. int x = 0; //always start at 0 int y = 101010; //is this a square root? square(x, y){ if((x*x) >= y){ //not a …

Member Avatar for cwarn23
0
324
Member Avatar for irhs

its my code for printing array of buttons with values R and B but i m not getting the output.. first of all i want to askk can we use random method in value field of button i,e value="<%=Math.floor(Math.random() * ('R','B'))%>" if no then is there any other way to …

Member Avatar for stultuske
0
141
Member Avatar for Lamirp

Ok I'm just looking for a cleaner way to achieve my goal here, if there is one and if this is not much of a satisfactory method. The goal is to accept an integer from a user using JOptionPane.showInputDialog. A brief example of what I'm currently doing do { check …

Member Avatar for mKorbel
0
7K
Member Avatar for cmps

Hello I ma trying to practice on Data structure using java. I solved a lot of problems but this one looks interesting but I need some help understanding what I really have to do ... > write a program that simulates the operation of a busy airport that has only …

Member Avatar for bodiddly123
0
675
Member Avatar for EdwardVX

Hi DaniWeb! I kinda need your help on this little bugger. How can I input this CSV file in to an array? Module Name, Module Code -- Student ID, Last Name, First Name, Exam Score, Average Introduction to Art Life, ITAL 07,Krave,Mark,27,30 60,Lever,Paul,89,96 13,Green,Jon,15,40 15,Davids,Jerry,5,15 If the Module Name and …

Member Avatar for JamesCherrill
0
591
Member Avatar for eldiablo1121

I have to write a program where I take user input and print out how many times each word prints out. Here is my code: import java.util.Scanner; import java.util.ArrayList; import java.util.Arrays; public class wordlist { public static void main(String[] args) { int i = 0; int USER_MAX = 50; String[] …

Member Avatar for JamesCherrill
0
226
Member Avatar for Kuroshi

The question is pretty straightforward, does BigInteger have a limit? From what I know it is only limited to the amount of memory available on the system, nothing else. This question arose when my instructor told me that one could not calculate 50! using BigIntegers, which I believe one can. …

Member Avatar for JamesCherrill
0
158
Member Avatar for wallet123

Hello guys, im trying to self study about connecting java to mySQL database. it's been a while since i used java, so i forgot some of the codes a little, and im also not so good at it. So im trying to connect, been copying and pasting codes trygint to …

Member Avatar for stultuske
0
356
Member Avatar for eldiablo1121

Hello, I have to write a program where I need to take an input from the user, a phrase with words seperated by spaces, and then print the phrase and show how many times a word is used in the phrase. I'm a beginner, I would like to know how …

Member Avatar for eldiablo1121
0
2K
Member Avatar for cool_zephyr

hi everyone. i've used the following way to store the uploaded files into D: drive of my windows machine from Tomcat server and it works pretty goood. private final String directoryPath="D:\\uploadedFiles\\"; File f=new File("D:\\uploadedFiles\\"+fileName); InputStream in=file.getInputStream(); OutputStream out=new FileOutputStream(directoryPath+fileName); byte[] buff=new byte[4096]; int count=0; while((count=in.read(buff))!=-1) { out.write(buff, 0, count); } …

Member Avatar for JamesCherrill
0
299
Member Avatar for OsamaJutt_1

Hello Guys, I am facing problem while i am create menu system using swtich statement. I have 3 level of menu but don't know how to go back to main switch Statement. For Example currently I am in 2nd level of switch but how to go in main(outer) switch. Please …

Member Avatar for stultuske
0
3K
Member Avatar for MichaelCJ10

I have a lottery program nearly completed, thought i had the last of the problems sorted but it seems i did not!! The program has a couple of issues. 1: Everytime i click a button it stores what i clicked, for example 10, and also creates a random number. Problem …

Member Avatar for nikolaos
0
252
Member Avatar for nikolaos

I am making a project in Number Theory and i want to display some formatting text in a textArea in my Gui. I have a method named padding which takes an integer as an argument and return a String consisitng of a number of spaces. This number is 12 - …

Member Avatar for nikolaos
0
933
Member Avatar for darlineth

Somebody help me, i'm a beginners of the java language, but in my interested to learn a java. and I create a GUI but the MDAS formula is not there, it because i dont know how to solve that, it cause need a pop and post function for the Calculator …

Member Avatar for darrylnuyda
0
2K
Member Avatar for student.09

Hi Everyone, I have a fairly simple (atleast it seems to be one) assignment loop program to create. But, unfortuntely having trouble getting started because I took a break from Java and now that I have decided to pick up with it again I feel like I've forgot everything. So …

Member Avatar for JamesCherrill
0
2K
Member Avatar for mikewyatt

I have a routine that requests an administrators approval for access to protected data. for security the adminsirator needs to know what data is requested. The following routine gets the password without any problem: public static Boolean Confirm_Change() { Boolean test = false; JPasswordField pf = new JPasswordField(); int okCxl …

Member Avatar for mikewyatt
0
154
Member Avatar for cobalt555

So I need all I need to do is let this info that is going through my array print out somehow. the problem is I cant get it to do that currently. I can get it to return the information one at a time for each employee . but at …

Member Avatar for stultuske
0
519
Member Avatar for manel1989

hi everyone! I want to get the output of my c++ application from my jaca applacations o i use a file abs.bat to get it done i used this code in .bat: start readxmlresou.exe that commande line opens readxmlresou.exe that is in my desktop and execute it, now i want …

0
98
Member Avatar for flebber

Hi I am looking some advice on which Java tools to use and /or any hints you can offer a new Java user regarding XML. What I want to do is take an xml file read it, modify it and push it to a database so that it can update …

Member Avatar for flebber
0
177
Member Avatar for koya.emer

Hi... I'm a new user here. I've stumbled across this place on a couple occasions in the past, and it worked out to my advantage when I needed a little help with some coding assignments. i need to include "parenthesis" in the equation in my program but i dont know …

0
149

The End.