36,051 Topics

Member Avatar for
Member Avatar for pripa

I am doing a project in jsp of creating question paper from question bank. Here we have to generate a paper based on the language like c,c++. we want to know how to generate the paper by considering two question from each area like inheritence,exception handling.the question has to be …

Member Avatar for lisaroy1
0
159
Member Avatar for ovidiu_b13

Can someone please help me make a simple java program for my class. I am a beginner, and don't know how to make one. I know a fiew stuff, but not enough. The teachers requests are: Write a program in netbeans that contains 4 of the following: 1. Classes - …

Member Avatar for JDCyrus
0
168
Member Avatar for deepak.marur

Hi, friends. I am wondering if it is possible to post messages to facebook through SMS. I have to write an application that connects to the facebook to post messages sent through a Short Code from a mobile subscriber. I am confused about the various APIs from facebook if they …

Member Avatar for JDCyrus
0
93
Member Avatar for katara
Member Avatar for JDCyrus
0
115
Member Avatar for jayvee0890

what wrong with this? [code] import java.util.Scanner; public class mid2 { public static void main(String[] args) { int a; int m; boolean jv=true; Scanner sc=new Scanner (System.in); System.out.println("Programmed by: Jesus Vinson J. Dominguez:"); System.out.println("Pls type number:"); a=sc.nextInt(); System.out.println("Pls type another number:"); m=sc.nextInt(); int gcf=1; int k=2; while (k=<a && k<=m){ …

Member Avatar for JDCyrus
0
86
Member Avatar for NaturalSwtHeart

I was just wondering what would be the best sort algorithm for sorting both a small array and a large one. Or if you can point me to a few efficient ones that can still do both that would be nice. small <=30 Also is there a cap that java …

Member Avatar for NaturalSwtHeart
0
129
Member Avatar for JDCyrus

Good evening. I'm having issues related to subprocesses. What I'm trying to do is launch another program that has a command-line mode (Gnucap, in case it matters) as a child process from my Java program, then communicate with it by reading from its standard output and writing to its command …

Member Avatar for JDCyrus
0
202
Member Avatar for hao90

I suppose to write the records to a text file. However every time i re-log in and add a record.The previous record will be rewrite. >.<'' [CODE]public void addRecords(){ getInfo(); FileWriter fWriter = null; BufferedWriter writer = null; try { fWriter = new FileWriter("PassengerInfo.txt"); writer = new BufferedWriter(fWriter); writer.write(name); writer.write(";"); …

Member Avatar for hao90
0
181
Member Avatar for mrnutty

If I use ProcessBuilder or Runtime.exec function, in a JApplet, does that applet needs to be signed or is there a way to get around this? I need to communicate with a C++ executable using java JApplet.

Member Avatar for mrnutty
0
92
Member Avatar for HDRG

When I press the print Button, all it prints is a blank page. This is my code: [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; import java.awt.Color; import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; public class OptionWindow extends …

Member Avatar for Ezzaral
0
204
Member Avatar for brynFlew

Hello, thanks for your time. Jsp + javaBean will not run in tomcat on local host [url]http://localhost:8080/is/scannerForm/process.jsp[/url], when i run it in eclipse though my local tomcat it actually does work and i can step through the jsp page as-well as the .java pages and i can see where they …

Member Avatar for brynFlew
0
245
Member Avatar for Progr4mmer

im trying to make so one if has two outcomes ex: if(prime % chk == 0) prime++ (and) chk++; i want to know how to put (and) into code so it does both if prime % chk == 0 this is what i have for my prime finder [CODE]class Number …

Member Avatar for Akill10
0
144
Member Avatar for boshu

Hi all, I have been using a macro definition to copy a set of files to different locations and FTP servers. But copying seems quite slow so I want to compress the bundle using 7z and copy all into FTP as one single file. Can it be done using 7z? …

Member Avatar for Ezzaral
0
211
Member Avatar for rohit2

I am developing a tool using java Swing. I have used JFrame in it. Now I need to add a status bar into it so that I can easily identify line no in my jTextpane during typing in JtextPane. I am planing How can I do it? Can any one …

Member Avatar for Ezzaral
0
72
Member Avatar for sasi_88

hi, i have two combo boxes one for country and another for state both populated from data base dynamically. [CODE] <%@page import="java.sql.*"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <select name="ctry"> <% String city=""; Statement pstm; ResultSet rs; try{ Class.forName("oracle.jdbc.driver.OracleDriver"); Connection connect =DriverManager.getConnection("jdbc:oracle:thin:@172.17.0.14:1521:develop","devuser","devuser"); pstm = connect.createStatement(); rs …

Member Avatar for brynFlew
0
206
Member Avatar for Anirudh.

Write a program to calculate the number of words,tokens,keywords,userdefined functions,system function for your java program. PS:you are supposed to make use of scanner class

Member Avatar for jon.kiparsky
0
104
Member Avatar for pmark019

How can I read multiple line inputs? I want to create a program that will ask a user for a program code and it will count all the reserve words used in the program. Every time I copy and paste a code for the input, it only reads the first …

Member Avatar for JamesCherrill
0
220
Member Avatar for wailoon88

[CODE]import java.awt.BorderLayout; import java.awt.Cursor; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.BufferedReader; import java.io.FileWriter; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.FileReader; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.io.FileReader; import java.util.*; …

Member Avatar for peter_budo
0
245
Member Avatar for javanerd21

please do inspect my code please, any error? in my net bean, its show the overall of the coding was red color. here is the code : [CODE] <%-- Document : updateAssignment Created on : Jan 18, 2011, 2:09:56 PM Author : Khalid Bin Dris 2008401558 --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> …

0
131
Member Avatar for daswebmastri

Hello All! First post I believe. I've hit a small program in a project of mine. For my Senior Projects class, I am writing an accounting system for a small town in Java. I have an AWT List Box that hold the login names for all the employees. In my …

0
37
Member Avatar for justinwarner

Hey, So, I have a class that has a bunch of info, the usual set/get methods. But my question is, I'm adding them all together in another method, and I don't know how you get it all in a nice table like format, with all the columns/rows being equal and …

Member Avatar for justinwarner
0
136
Member Avatar for CrimsonGT

I wrote a small c# .NET application that is basically a controller for a Java application. My company has been using a .bat file to launch it, but we need an .exe so our web panel can detect when it is online/offline/etc. When my .NET application starts, it starts the …

0
83
Member Avatar for mangopearapples

How can I get a single line of text of a textarea? So like if I had "Hello Mellow Yellow" Then line 1 would be Hello and line 2 would be Mellow ect. How can I get that? Something like: [CODE] JTextArea area = new JTextArea(); System.out.print(area.getLineOfText());[/CODE] Thanks.

Member Avatar for mangopearapples
0
2K
Member Avatar for Neversleepin

Hi, I’m trying to code a small program which allows us to select multiple files from a folder and save the content of all files previously selected in one file. The code is very well without GUI (in console). But now I want to do the same with a GUI. …

Member Avatar for Neversleepin
0
2K
Member Avatar for HDRG

What do these errors mean? im new to java.. Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl<Container.java:1041> at java.awt.Container.add<Container.java:365> at OptionWindow.<init><OptionWindow.java:63> at OptionWindow.main<OptionWindow.java:182> please help

Member Avatar for HDRG
0
195
Member Avatar for DarkLightning7

I am building a text only hangman game and I have gotten it to the final stages as far as I know I only have one problem I can't figure out why my char comparison values are always returning false even though I know that the characters are the same. …

Member Avatar for JamesCherrill
0
260
Member Avatar for anuj_sharma

Hi, I have two XML files namely (1)'message_gen.xml' and (2)'message_user.xml'. The (2) file is correct and the (2) is generated by an application. The (2) file should be same as that of the (1) file i.e. it should have the same elements, the same element content. I am currently using …

0
86
Member Avatar for ngod23

Hi, Hope you can help, a client of mine has a site with dynamically generated URL's, I want to make the URL's SEO friendly, clean them and rewrite them as new keyword rich URL's and then redirect the old URL to the new. I am trying to carry out some …

0
65
Member Avatar for hoven

The java program i have to come out with for a mini project is a interest calculator, using jcreator. Where you have to calculate the following 1. interest payable 2. principle required to earn $x of interest 3. calculate time required to earn $x of interest. The program must cycle …

0
64
Member Avatar for Neversleepin

Hi, i'm trying to create a "Save as" frame with my small program. It must open a Save As windows where i could choose the name of the file (txt) that i want to save. Is there any method to do this? i didn't find with google. Thanx

Member Avatar for Neversleepin
0
846
Member Avatar for jsefraijeen

Define a method hypotenuse that calculates the length of the hypotenuse of a right triangle when the lengths of the other two sides are given. (Use the sample data in the table below) The method should take two arguments of type double and return the hypotenuse as a double. Incorporate …

Member Avatar for bibiki
0
3K
Member Avatar for loken

I am currently working on a project (contact IS) built using openlaszlo and I am using mysql as database... I use JSP as the servlet that will handle the connection to the database and present the information to openlaszlo as XML, however when I try to add a new contact …

Member Avatar for cute_adi
0
4K
Member Avatar for u_v

create a Report of Customers and my database are MicroSoft Access 2000 Coding are Following Plz somebody hlp me in my project [code=java]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class FrmCustomerReport extends JDialog{ public static JTable JTExpTable; //Start create variables JButton JBSearch = new JButton("Print",new ImageIcon("images/print.png")); JLabel JLPic1 = new …

Member Avatar for Akill10
0
110
Member Avatar for kitt_simple

How do I make Two frames? when frame1 is open the frame2 is hide,and when frame2 is open the frame1 is hide?

Member Avatar for Akill10
0
94
Member Avatar for prem2

Dear all, Scope resoultion operator is used to call the properties or methods of the class. Properties : =========== Variables Constants Why scope resoultion operator cannot be used for non-static variables . Can any one help me out . Thank you, With Regards, Prem

Member Avatar for Akill10
0
152
Member Avatar for jsefraijeen

Implement the following integer methods: a.Method celsius returns the Celsius equivalent of a Fahrenheit temperature, using the calculation b. C = 5.0 / 9.0 * ( F - 32 ); c. Method fahrenheit returns the Fahrenheit equivalent of a Celsius temperature, using the calculation d. F = 9.0 / 5.0 …

Member Avatar for masijade
0
911
Member Avatar for smcr01

I got this program that supposed to display a diamond but I only got the top part of diamond to work. As for bottom part I am not sure what calculation I could use. Any hint would be appreciated! Thanks This is the part: [CODE]//Bottom Part for ( row = …

Member Avatar for masijade
0
134
Member Avatar for cb0058385

Hi can someone plese clarify this: Should all the Persistant Message be delivered to all the Subscribers in a Topic? If yes, What happens if a Non-Durable Subscriber is down?

0
77
Member Avatar for anithajerome

Hi I need to send email thru my jsp with authentication.but i am getting an error as: Could not connect to SMTP host: localhost, port: 587; Pls if anybody know the solution,guide me

0
65
Member Avatar for alonewolf23

using textpad w/ jdk When trying to use single print line: System.out.println("\n" + var1,"\n" + var2); I get error: symbol : method println(java.lang.String,java.lang.String) location: class java.io.PrintStream System.out.println("\n" + var1,"\n" + var2); I understand that \n is new line, and My instructor told me to just use + "Integer name" for …

Member Avatar for alonewolf23
0
19K
Member Avatar for Feriscool
Member Avatar for pbl
0
86
Member Avatar for EagerLearner167

I'm a student. I am trying to make simple project for online borrowing book system. Basically the flow is from Borrow.jsp (The user select which data their want to update) The UpdateBorrowBinder.java will grab the object and pass to sql then bring the result to appear in UpdateBorrow.jsp But the …

0
80
Member Avatar for tedelston

Hi, I recently installed jcreator and jdk 1.6 i was testing out the program to see if it worked correctly I used a really simple program(below) but whenever I type a second integer, the error "Make sure you enter an integer" appears, I've tried a few simple programs to the …

Member Avatar for tedelston
0
280
Member Avatar for scottdurica

I'm building a program allows me to answer questions with radio buttons, and then save a list of the questions and the selected answers to a .txt file which I can convert to a .pdf from Word or some other program. Im using a PrintWriter to write the file, and …

Member Avatar for mcriscolo
0
736
Member Avatar for plasticfood

[CODE] vowels = wordcount.vowelNum(); //counts the vowels consonants = wordcount.consNum(); //counts the consonants, this is not working properly. [/CODE] the consNum() method: [CODE] int length = word.length(); for(int i = 0; i < length; i++){ if(word.charAt(i) == 'a' || word.charAt(i) == 'u'|| word.charAt(i) == 'i'|| word.charAt(i) == 'e'|| word.charAt(i) == …

Member Avatar for plasticfood
0
102
Member Avatar for AhmedGhazey

Hello I make java application that read String from text field and convert it to another String it may consider type of encoding . but i want process character by character when user still typing on the the text field. i.e. a-->s ah-->sd ahm-->sdf ahme-->sdfg ahmed-->sdfgh any one can help. …

Member Avatar for AhmedGhazey
0
89
Member Avatar for earwax

Hi, I am trying to grab frames from a video using JMF. Here is the code i use for getting the frames. Unfortunately, getControl returns null so i get nullpointerexception. [CODE]FrameGrabbingControl frameGrabber = (FrameGrabbingControl)player.getControl("javax.media.control.FrameGrabbingControl"); Buffer buf = frameGrabber.grabFrame();[/CODE] 1) I can open and view the video. So why am i …

0
56
Member Avatar for javanerd21

hi guys, thanks for viewing my thread. Being in oracle for database administration is something awesome. I would like to know on how a bulk of documents in .txt file could be cluster using oracle 10g. The documents all are report which are contain Speaker Name , Report ID , …

0
91
Member Avatar for tozymba

Hello. I'm just beginning to learn Java and right now I'm working on simple text-based Hangman. But I am having problem replacing unknown letter with correctly guessed letter. (i.e "_ _ _ _" unknown word is roll. User inputs "l", "_ _ _ _" this becomes "_ _ l l") …

0
53
Member Avatar for nitins60

Hello friends [CODE]String sql = "SELECT * FROM work.cs_book WHERE bookname = ? AND author = ? AND category = ?";[/CODE] I have writtern above query and where i can search for a book based on bookname author and category. I am using preparedStatements to execute query. However something is …

Member Avatar for majestic0110
0
120

The End.