35,618 Topics

Member Avatar for
Member Avatar for dqddani

Hi, I would like to make a window with a given size, and a scrollable textarea to a given place within. When I tried the same with a button instead of textarea, it was no problem: make a JFrame, put a JPanel inside, put a JButton on the panel. Then …

Member Avatar for subhraakasuny
0
266
Member Avatar for doniandric

i have certain codes in JSP and JSTL as following : <sql:transaction dataSource="${dataBase}"> <sql:query var="tDate"> SELECT starttime FROM campaign WHERE cid=25; </sql:query> </sql:transaction> <c:forEach var="row" items="${tDate.rows}" varStatus="totalRow" step="1"> <c:set var="starttime" value="${row.starttime}" /> <c:set var="datetime" value="${fn:split(starttime,' ')}" /> <c:set var="date" value="${fn:replace(datetime[0],'-',',')}" /> </c:forEach> <% Calendar d = Calendar.getInstance(); d.set(date); %> but …

Member Avatar for subramanya.vl
-1
182
Member Avatar for yuri1969

Howdy, for instance this JSTL snippet produces following result. <a href="<c:url value="Profile"> <c:param name="username" value="${requestScope.username}"/> <c:param name="logout" value="true"/> </c:url>"> Logout </a> Result: <a href="Messages?username=abc&logout=true">Logout</a> Ofc this thing works. However, validating against XHTML 1.0 Strict ends up with: > cannot generate system identifier for general entity "logout" href="Messages?username=abc&logout=true">Logout</a> Apparently it doesn't …

Member Avatar for yuri1969
0
345
Member Avatar for angel sunflower

i hav a shopping cart in java he columns of jtable are code-the item code qty-the quantity enterd by the user i want to update the quantity in database .the description of the table is code -item code stock-total stock in hand. i need to to update the quantity by …

Member Avatar for angel sunflower
0
976
Member Avatar for subhraakasuny

hi folks, i am a beginner in JSP, and i am studying headfirst servlet & JSP,but at the time of running a code from there,i have an problem there is directory structure **src/com/example/web/BeerSelect.java** and the code is package com.example.web; import com.example.model.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public …

Member Avatar for subhraakasuny
0
304
Member Avatar for aabbccbryanmark

import java.util.*; public class LinkedListDemo { public static void main(String[] args) { LinkedList link=new LinkedList(); link.add("a"); link.add("b"); link.add(new Integer(10)); System.out.println("The contents of array is" + link); System.out.println("The size of an linkedlist is" + link.size()); link.addFirst(new Integer(20)); System.out.println("The contents of array is" + link); System.out.println("The size of an linkedlist is" + …

Member Avatar for stultuske
0
254
Member Avatar for hwoarang69

i am create animation in japplet and i want to know if iam using paint method and draphics2d the right way. public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D) g; g2d.fillRect(x, y, width, height); //player }/** end of paint method ***/ another question i had was in run …

Member Avatar for JamesCherrill
0
256
Member Avatar for Atlanta15Braves

I am trying to sort a certain amount of integers. I have an error in my code. The code is below as well as my error message. Any suggestions of how to fix this? I believe it has to do with it being primitive data rather than an object? `public …

Member Avatar for subramanya.vl
0
384
Member Avatar for Kunai9292

A so-called “star number”, s, is a number defined by the formula: s = 6n(n-1) + 1 where n is the index of the star number. Thus the first six (i.e. for n = 1, 2, 3, 4, 5 and 6) star numbers are: 1, 13, 37, 73, 121, 181 …

Member Avatar for subramanya.vl
0
270
Member Avatar for joe.crook.9

In the last line of this method I am getting a missing return statement error, and I cannot figure out why. Any ideas? public static int parameter(int g){ Scanner console=new Scanner(System.in); String hint=console.next(); if(hint.equals("low")){ g=(g/2)+g; return g; }else if(hint.equals("high")){ g=(g/2); return g; }else if(hint.equals("correct")){ g=g; return g; } }

Member Avatar for stultuske
0
175
Member Avatar for devindra.storm

I'm having a weird problem where programs I write in Netbeans compile and run fine in the IDE, but when I try to run it from the command line, it finds errors and won't compile. A class file in the same directory that my main class needs to instantuate and …

Member Avatar for devindra.storm
0
163
Member Avatar for kanbear11

I have a person class public class Person implements Comparable<Person> { //Instance Variables private String firstName; private String lastName; private int age; private char gender; private String ssn; // This is the constructor of the class Person public Person(String firstName, String lastName, int age, char gender, String ssn) { this.firstName …

Member Avatar for kanbear11
0
1K
Member Avatar for francoiscx

Good day. I am trying to construct a mailto: url that will include the specific domain name or if possible the previous url from which a mail is sent from. I want to use this as an error report so that when an error is encountered by a person browsing …

Member Avatar for JamesCherrill
0
80
Member Avatar for thanatos1

Hello guys, I've been working on a game in Java, it doesn't use any third party libraries so everything was made from scratch, I was wondering if anyone was interested in helping me bring it to the next level. The game is going to be essentially a mix of Castlevania/Dark …

Member Avatar for lauried.shepherd
0
163
Member Avatar for WaltonPan

import java.util.Scanner; public class array_Project { int index; Scanner scan=new Scanner(System.in); System.out.println("Enter index number"); int[]Project={10,15,20,25,30,35,40,45,50,55}; } public class array2 { switch (int index) { case 1: if(index=0) { System.out.print(Project[0]); } break; case 2: if(index=1) { System.out.print(Project[1]); } break; case 3: if(index=2) { System.out.print(Project[2]); } break; case 4: if(index=3) { System.out.print(Project[3]); …

Member Avatar for aravind326
0
247
Member Avatar for Maritha33

Guys, I really need your help. I have a Project about any systems activities related to java Program and I choose Mini Search Engine. Can you please Help me of how to use Class and Objects cause I'm about to use them in my source code. thanks.

Member Avatar for JamesCherrill
0
328
Member Avatar for kbondarchuk

public static int f (int []a, int []b,int []c) { final int N=a.length; int j, k=0, g=0, t=0 ; for(int i=0;i<N;i++) { for (j=0;j<N;j++) if (b[j]==a[i]) break; if (j==N) { c[t]=a[i]; if (g==0 || c[t]>k) { k=c[t]; g=1; } t++; } } return k;

Member Avatar for JamesCherrill
0
212
Member Avatar for adishardis

Hi, I have a json_encoded array that comes out like this `{"y":33,"customTooltip":"BOK"},{"y":61,"customTooltip":"DRFlytt"},`... I need it to come out without the quotes surrounding the y and the customTooltip and singlequotes around the last value like this `{y:33,customTooltip:'BOK'},{y:61,customTooltip:'DR'},` Is this possible or should I find another approach? I derive the array like …

Member Avatar for adishardis
0
135
Member Avatar for nazmule27

What is NULL? Please answer if know it exactly in java Perspective.

Member Avatar for JamesCherrill
0
133
Member Avatar for swetha1991

i have installed tomcat and deployed axis folder in the tomcat->webapps and my .jsp and .jws files in the axis folder of webapps, while my .jws files are executing successfully and showing the wsdl code, my .jsp files are showing the error page as follows: type Exception report message description …

Member Avatar for jalpesh_007
0
268
Member Avatar for jlemieux

I have an assignment to create 2 arrays. One holding Student names, one holding their grades. They then have to be sorted using BubbleSort, so that their grades are in descending order. I have created the first part of it, that allows me to put in their grades, and I …

Member Avatar for jalpesh_007
0
272
Member Avatar for johndy.maghanoy

how can i deleting an element in an array, then replace it with to 0 the move 0 to the last element???

Member Avatar for jalpesh_007
0
98
Member Avatar for almondjoy

hey guys, can you suggest a good java compiler for me? i had eclipse, but it literally FELL APART. thanks, almond joy

Member Avatar for jalpesh_007
0
106
Member Avatar for System Networks

'm new to Java and please try to explain to me. I am developing a game using slick2d and I'm making so called a shop.class and a player.class The shop class should add medkits to the player class. I have been making so many test on it even testing if …

Member Avatar for jalpesh_007
0
278
Member Avatar for crownedzero

I'm just curious about the use of frames/panels etc. What's are your general practices and why? Single main JFrame with multiple internal then toggling visibility of panels within? Just starting with swing and rather curious how other people implement them.

Member Avatar for jalpesh_007
0
137
Member Avatar for davkam

tickets consist of four colours: green, blue , red, and white. each ticket has an associated price: green cost €5, blue cost€10, red cost€20, white cost€30. write an enumerated class Ticket that has a toString method that pretty prints it and a getCost method that returns its cost.

Member Avatar for jalpesh_007
-1
210
Member Avatar for jalpesh_007

Dear all, I have following code and i want to write elements of array in single string(merge with ,) , in between all the values. like a[0] = "hi" a[1] = "hello" a[2] = 1 a[0] = "get" a[1] = "post" a[2] = 2 a[3] = 45 then i want …

Member Avatar for jalpesh_007
0
303
Member Avatar for hwoarang69

i know java c and c++ but i like java just because it was the first language i learned. i ask alot of people and they all seem to say "make game in c++" or "not a good idea to make games in java". what you guys think? should i …

0
96
Member Avatar for howardcartter

import javax.vecmath.*; import com.sun.j3d.utils.universe.*; import javax.media.j3d.*; import com.sun.j3d.utils.behaviors.vp.*; import javax.swing.JFrame; import com.sun.j3d.loaders.*; import com.sun.j3d.loaders.objectfile.*; /** * An example for constructing an object (tetrahedron) with triangles * where normal vectors are interpolated. * * @author Frank Klawonn * Last change 05.07.2005 * @see GeomArrayExample */ public class Isocahedran extends JFrame { …

0
98
Member Avatar for ashsha

I have created a polygon (6 points). Lets call this one, outside polygon. inside the outside polygon I created smaller polygons. I want to flip all of it vertically. I know the points of the outside polygon and I have an ArrayList for the inner polygons. I was able to …

Member Avatar for Taywin
0
395

The End.