35,618 Topics

Member Avatar for
Member Avatar for CaffeineCoder

OK, this should be easy (in theory) but I'm having issues with the java applet showing up in the HTML. The applet works when I run it within the IDE, but when I try to run the applet, a message in the bottom left of the applet window says that …

Member Avatar for CaffeineCoder
0
122
Member Avatar for Merumi

public class GenerateCipher { /** To generate keyPhrase into cipher alphabet and secret code * @param keyPhrase keyPhrase to be changed * @return changed keyPhrase */ public static String generateCipherAlphabet (String keyPhrase) { //defines the variables and creates alphabet string String realStr = ""; String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; String newStr …

0
67
Member Avatar for WalkmanXD

There is no pointers in Java, But how could java solve the problem of Dynamic Memory Allocation ???? [ As we know that pointers in C++ solve this problem ] Is there a solution WHAT is it ? and HOW to use it ? Please, explain with Examples... Thanks in …

Member Avatar for jwenting
0
247
Member Avatar for duongkhangth2

Hello everybody , Im created an Application in java . In that application i have to store data in a web Mysql database.How can i connect ?

Member Avatar for jwenting
0
68
Member Avatar for Beryl

[code=html]<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="com.py.db.*, java.sql.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style.css"> <title>Registration</title> </head> <body> <% String id = request.getParameter("login_id"); String password=request.getParameter("password"); String email= request.getParameter("email"); DataSource ds = new DataSource(); ds.executeUpdate("insert into user …

Member Avatar for jwenting
0
96
Member Avatar for tte

Maybe a dumb question but is there a way to redirect/forward a form (and all it's parameters) to another host using jsp? Like this [url]http://www.xxx.com/form.jsp[/url] -> [url]http://www.xxx.com/redirect.jsp[/url] -> [url]http://www.yyy.com/response.jsp[/url] I've tried with sendRedirect which doesn't pass along the parameters and forward that for some reason doesn't seem to work with …

Member Avatar for jwenting
0
143
Member Avatar for Ankita B

Hi, I wish to save value entered by user in textbox in a session variable.my form contains many elements and i need to navigate back and forth.so i want to save the value once entered by the user in a session variable so that i can retrieve it and display …

Member Avatar for jwenting
0
1K
Member Avatar for Katherine692008

import java.io.*; public class k { public static void main(String args[])throws IOException { k s1 = new k(); s1.menu(); } public void menu()throws IOException { int input = 0; System.out.println("Pick from 1 of the following Options"); System.out.println("1) Twelve"); System.out.println("5) Exit "); System.out.println("Enter Number: "); BufferedReader br; br = new BufferedReader( …

Member Avatar for Ezzaral
0
132
Member Avatar for rajeshwarreddyt

Hi Folks, I have to print the error with line and error name using log4j property file so what property should i put in log4j property file so i will print error with line numbers! Regards, Rajeshwar.

Member Avatar for darkagn
0
89
Member Avatar for ravicsit
Member Avatar for darkagn
0
29
Member Avatar for ihtraa

[code] public void addRowsAntGrouping(){ Vector vectorAddRow = new Vector(); vectorAddRow.add(""); vectorAddRow.add(""); ((DefaultTableModel)jTableAntGrouping.getModel()).addRow(vectorAddRow); } [/code] Hi, I am in need of replacing the textfield of a table with combobox. the rows in the table are declared as vectors. there are two fields in the table. the first field is text and …

Member Avatar for masijade
0
91
Member Avatar for rajdotme

Hi, I understand, Socket.setkeepalive() enables the user to keep the socket alive. Here is an extract from the SocketOptions interface from the Sun site about the SO_KEEPALIVE variable: When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction …

0
50
Member Avatar for torbecire

We are supposed to read data from a file like [COLOR="Green"]2 2 0 0 w d d w 0 1 w w d d 1 0 d w w w 1 1 d w x d[/COLOR] The first two numbers represent the column and rows the rest of next two …

Member Avatar for torbecire
0
100
Member Avatar for Noliving

Here is the preorder: [code=java]private void preOrderTraverse(Node < E > node, int depth, StringBuilder sb) { for (int i = 1; i < depth; i++) { sb.append(" "); } if (node == null) { sb.append("null\n"); } else { sb.append(node.toString()); sb.append("\n"); preOrderTraverse(node.left, depth + 1, sb); preOrderTraverse(node.right, depth + 1, sb); …

Member Avatar for jinternalframe
0
94
Member Avatar for fnbhns

Dear Friend, I am new in Jave. right now I am learning APPLET but When I am trying to use THREAD in applet its giving the following warning after compilation. Note : Java Uses or Overloads a Depricated API. Note : REcompile with -XLint : Deprication for details. Tool Completed …

Member Avatar for fnbhns
0
79
Member Avatar for ntdaycott

I have a student class and also a cohort class. I need a command to find a certain student aStudent, bStudent etc but are unsure of the right way to do it Thanks in advance [import java.util.*; public class Cohort { private static int groupSize = 15; private HashSet aCohort; …

0
66
Member Avatar for raju123007

i posted a problem here a while back on doing a program, and i got the help i needed... but i'm faced with another problem. this code seems to be working fine but i want it store the values i entered into another text field... i cant seem to figure …

Member Avatar for Ezzaral
0
188
Member Avatar for juxD

Hey everyone, I've written an application with an animation using the Timer object. In order to stop the animation I call the stop method of the Timer class. From what i've read this just pauses the timer. My problem is that if i display the animation once it displays well. …

Member Avatar for Ezzaral
0
70
Member Avatar for shaikh_mshariq

Hello To Every One I have transformed xml document using servlet now i need to know how can i transform xml document using jstl. I have found this code very often but it doesn't work with a relative or absolute url. I need to pass parameters dynamically. [CODE]<c:import var="xml" url="<%=xmlFile%>" …

Member Avatar for jwenting
0
133
Member Avatar for torbecire

I have these two classes Maze and MazeCell. I have a problem with the Maze constructor in Maze Class and do not know how to access it, or test it. Does Maze N = new Maze(row, col) do anything. I know it's supposed to set it as the length of …

Member Avatar for parthiban
0
287
Member Avatar for cage

Hello, guys. I'm very new to Java and this is my first time I'm actually programming by myself. I have a homework due soon. Anyways, my question is: Write a program that asks the user for a word to replace in some text, and the word to replace it with. …

Member Avatar for Ezzaral
0
814
Member Avatar for Kusno

Dear all, I have these code below (netbeans) : All cells in columns "saldo Awal" are set to 58000000000.00, but appear in cell is 5.8E9 What should I fix in my code ? Thanks, Kusno import javax.swing.DefaultCellEditor; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; import java.awt.Component; import java.text.NumberFormat; import javax.swing.JTable; import javax.swing.JOptionPane; import …

Member Avatar for Ezzaral
0
105
Member Avatar for Adila

how do i reset the applet? i thought that it would work if i call the method itself thanks [code=java] private class ButtonListener1 implements ActionListener{ public void actionPerformed(ActionEvent e){ myButton1.setBackground(Color.black); int answer = JOptionPane.YES_OPTION; answer = JOptionPane.showConfirmDialog(null, "BOOOoooM!!! Would you like to play again?", "", JOptionPane.YES_NO_OPTION); if(answer == JOptionPane.YES_OPTION){ LoanApplet …

Member Avatar for Adila
0
727
Member Avatar for Ryano24

I have to write an applet that asks the user to enter two floating-point numbers, obtains the two numbers from the user and draws their sum, product, difference and quotient. This is what I have so far. Can anyone make sure I am on the right track. import java.awt.Graphics; // …

Member Avatar for darkagn
0
106
Member Avatar for a_iyer20

Hi All, I have 2 classes. say Class A and Class B. My logic is coded in a method in class B. I am accessing this method of class B by creating an instance of class B in class A. To explain better: Class A{ ClassB b = new ClassB(); …

Member Avatar for a_iyer20
0
97
Member Avatar for gops

public class myMutableTreeNode extends DefaultMutableTreeNode { // tree nodes rendered as JTable } public myWin extends Jframe() { // constructor top = new myMutableTreeNode(); jTree1=new JTree(top); .................................. // nodes are added to tree and rendered as jtable // On “save” menu option, I want to save this Jtree1 using XML …

0
56
Member Avatar for tracyda

The following code is what I have so far. I know there are errors in some parts, because i'm currently still workin on them. However, I am having trouble invoking the reduce() method. The purpose of the program when im done is to be able to add and multiply fractions …

Member Avatar for jinternalframe
0
147
Member Avatar for Noliving

Well this is a lab assignment, the problem I'm having is that the sample code he gave us is suppose to run as is, but it doesn't. I email him and he thought that most likely there might be a problem with the CLASSPATH for java or that I might …

Member Avatar for Noliving
0
183
Member Avatar for Dani

I've made some changes to the JavaScript that powers DaniWeb today. Can those of you who have JS/AJAX/DHTML disabled please enable it and let me know if it corrects the speed problems you were having. Thanks!

Member Avatar for Dani
0
198
Member Avatar for tro

I am passing information between two forms. Up to now, I have passed information from one form to another. Is there another way to do this? [DisplayDie dpDie = new DisplayDie(dp); // Getting constructor error in this line DisplayPanel dp = new DisplayPanel(dpDie,dpDie);] When I swap the lines, error moves …

Member Avatar for tro
0
241

The End.