35,618 Topics
![]() | |
I want to make a jsp page which checks some condition and if it is not true it should send error response 404 to server.. so that the tomcat server should think that the page is not available... is it possible to do in jsp..??? | |
Hi All, I need to write a class to draw and add some components on frame like images,rectangles. I have a class which is already written by some other person, and now i need to add 14 adjacent rectangles on the existing frame. [CODE] import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; … | |
[CODE]import java.awt.*; import java.awt.event.*; import java.applet.*; /*<applet code="actionapplet" width=500 height=600></applet>*/ public class actionapplet extends Applet implements ActionListener{ String msg,str; Button b1,b2,b3; public void init(){ b1=new Button("substract"); b2=new Button("add"); add(b1); add(b2); b1.addActionListener(this); b2.addActionListener(this); } public void actionPerformed(ActionEvent ae) { str=ae.getActionCommand(); if(str.equals("add")) msg="addition is to be performed"; if(str.equals("substract")) msg="subtraction is to be … | |
Sending one image works, but when i repeat the cycle again it just doesn't work. my Client side code (excerpt): [code] for(int i=0;i<50;i++){//fromServer.contains("image") img = ImageIO.read(in); System.out.println("Got image."); label = new JLabel(new ImageIcon(img)); scrollPane.setViewportView(label); fromServer = reader.readLine(); }[/code]On the client side i have this output [code]Got image. Got image. Exception … | |
I want to display a player in Jsp page that supports .wav file | |
[COLOR=Blue]Hello.... I'm currently using Netbean 5.0 and I just want to add some GIF files to my program when it builds. I'm using the files as icons for some of the GUI buttons and labels. But when I select clean and build main project or build main project and execute … | |
:S what iz event model??? what is its use n why i shud use dis n not others????? plzz xplain wid eg........ w8iting....:-/:?: | |
Is there other way to write a Menu code, not using Switch, or creating other Method homework : create Menu in Java code i was wondering if it can be achieved not using switch and not creating other methods (public static void Main)(public static void sayHi()) Thank you. | |
Help! Im trying to overwrite a certain record in a text file (basically a log in log out file). Im using Random Access File. I tried to write the updated record using writeBytes but what happens is that it was APPENDED after the record i wish to overwrite. from 150.20.111.0&2010062216:06:31 … | |
How could I like programming ? When you spend 2 days on one single, pointless line and the only thing you get to see is an ERROR-response. It`s really inhuman and I cant imagine who would want this voluntarily. Nevertheless, what am I yammering about is following error, that is … | |
Hi can any one help me please .. i want validate textfield value with database in jsp onchange event .. i am using struts2 ..when i enter a value in textfield on onchage event the value should get validate with database and if the data is present it should display … | |
I'm making an application that converts units. I cant not for the life of me figure out why this isnt working. The answer returned is 0.0 when I convert from Fahrenheit to Kelvin or vice versa. The K to C conversions work though. Any insight would be amazing. This is … | |
I am having a problem with my final assignment. Now it began with an apology from my prof on the said assignment because for the pass 9 weeks we have done projects that has focused on a small part like change colors, stream, inheritance, etc. Now the final is to … | |
please send the correct real time example in java projects of static polymorphism and dynamic polymorphism | |
Hi I am very new to the JSP and EL. I have a JSP main file which loads several custom tags from tagx files. But all tags for now are statically loaded on page load. I want to dynamically load the custom tags using javascript I wrote a ajax/script for … | |
Hello Daniweb users, I am developing a small client for messaging, the messaging part is okay! :) Now the problem is with the GUI. I want to implement a "tabbed chat interface", similar to that of MSN or iChat. I am implementing a JTabbedPane for each "window". My problem is, … | |
hi guys i have been researching about wii remotes and that they could be used to create interactive whiteboards. the software for interactive whiteboard originally has been created by johnny lee in c# well im not an expert in c sharp nor in java :) but i found a version … | |
Hi everyone, I am doing a project for school and i'm having some problems. I have a Profile page. When i call on Profile.java, this servlets get(doGet) the profile info from the database and shows it on the profile.jsp. The user has the option to edit the info on the … | |
Ola As I understand functions and methods can be used to reduce duplicate coding by calling the said functions or methods by components or procedures. Now, when is it better(uses less system resources) to use duplicate coding than functions\methods or vica versa, i.e if you have 3 or 4 lines … | |
Hi I am in need of some guidance here. basically I want to know if Java is busy dying a slow death and if it is not what else does one need to learn to have a complete and marketable skill set? java dying slow death: dot net has come … | |
Can I create a class inside a method,could anyone Explain me with a simple example ? | |
Hi, I am creating an application for remainder. and I want it to be run in background and monitor all its tasks. I need help about how to make a java application to be run in background. It should work in linux as well as in windows. Help me....! | |
Hi All, I hv written a java swing class in Eclipse IDE. i hope the code is 100% correct but when im running the class, the error message is displaying in the console. As [COLOR="Red"]Exception in thread "main" java.lang.NoClassDefFoundError: com/cname/lct/madm/gui/madmplugin/rani/ConfirmExitDialog[/COLOR] Below is my code [CODE] package com.cname.lct.madm.gui.madmplugin.rani; import java.awt.*; import … | |
Hi am creating a simple Java calculator and I keep getting the error: DylCalc.java:21: cannot find symbol symbol : variable Total location: class DylCalc JOptionPane.showMessageDialog(null,value1+" - "+value2+ "="+Total); ^ Here is my code is anyone has any Ideas: import javax.swing.JOptionPane; /** This program is a simple Addition, Subtraction, Multiplication and … | |
i try to remake some project from [url]http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html[/url] And i want when i click on the picture. Image in JViewarea automatic move without click on JScrolBar. But i don't know how to implement this... Can somebody help me?? Thanks... | |
Say I have a pac-man applet and I have a counter that increments every time a dot is eaten, and I want to save that for every player, for every game, so there will be a total number of dots eaten from everybody combined. The counter will never reset, just … | |
Hello forum, I am wondering if it is possible to do a mark-up in free text by comparison with some string. Suppose I have a file with several sub-strings, one in each line. I have another file which contains the full text from where the sub-strings are generated. Is it … | |
Hi I am working on a dice game. I want to make a counter for the number of times the 2 dices roll and the output of the 2 dice.It should be something like this. Roll#1 1 4 Roll#2 2 5 Roll#3 4 6 Roll#4 2 3 It can only … | |
[code]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; class ll{ public static void main(String[] a) { FileReader fr; try { fr = new FileReader (new File("C:\\University Study\\Component Engineering\\Assignments\\Assignment !\\yourFile.txt")); BufferedReader br = new BufferedReader (fr); String line = br.readLine(); while (line != null) { System.out.println(line); line = br.readLine(); … | |
Please suggest if there is any best way around on executing jar from java code then killing parent java code. a)I have desktop based java application say "Monitor.java" which runs every 5 minutes. b) How can I [B]START external java application[/B] say "execute.jar" from Monitor.java [B]THEN EXIT/KILL[/B] Monitor.java I tried … |
The End.