Java Queries Here..

tuxybuzz

Ballack Junior
notepad/textpad on windows.
vim on linux.
While starting off with a text editor is always good. I do suggest you move onto a full fledged IDE(Netbeans, Eclipse etc.) once you have considerable command over the language.
 

funstreak

Right off the assembly line
I'm creating a java code and getting an error.

Prog is I have to rotate a string in Applets.
Suppose a String is "HELLO".
I can rotate this string as :

HELLO -> HELLO -> HELLO

i.e. running on x axis.

Now Where exactly i'm getting the error is when i'm trying to rotate its characters. Means I want output like this :

HELLO
OHELL
LOHEL
LLOHE
ELLOH
HELLO

Rotating like this.
Tell me what to do now? I'm using a concept of substring in it.
Code:
String r = s.charAt(s.length()-1) + s.substring(0, s.length()-1);
 

Garbage

God of Mistakes...
Actually, you should be changing the x co-ordinates of the JLabel and not the characters of string.
 

funstreak

Right off the assembly line
Sorry but i had not learn about java labels as i am beginner in it. and learn java upto io packages. now m learning applets.
 

RBX

In the zone
I'm creating a java code and getting an error.

What error ? I think I've seen same example in Herbert Schildt's Complete Reference to Java. If you've used exact same code, then there might be other reasons behind the failure of applet.



Posts being merged is a real pain

Here is a problem I was unable to solve on my own. My path variable contains D:\Program Files\Java\jdk1.7.0\bin but running java from cmd starts build 1.7.0-b127 whereas the one installed at specified path is 1.7.0-b147

D:\Documents and Settings\Tushar>"D:\Program Files\Java\jdk1.7.0\bin\java.exe" -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

D:\Documents and Settings\Tushar>java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b127)
Java HotSpot(TM) Client VM (build 20.0-b06, mixed mode, sharing)
 
Last edited:

Garbage

God of Mistakes...
Here is a problem I was unable to solve on my own. My path variable contains D:\Program Files\Java\jdk1.7.0\bin but running java from cmd starts build 1.7.0-b127 whereas the one installed at specified path is 1.7.0-b147

D:\Documents and Settings\Tushar>"D:\Program Files\Java\jdk1.7.0\bin\java.exe" -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

D:\Documents and Settings\Tushar>java -version
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b127)
Java HotSpot(TM) Client VM (build 20.0-b06, mixed mode, sharing)

This is because you have 2 JRE/JDKs in your Window's PATH variable. And in that semi-colon separated PATH variable, entry for 1.7.0-ea is first.
Edit your PATH environmental variable. It will solve your problem.
 

achuthan1988

Broken In
A pleasant experience with this book!

I am almost through reading head first java and it is a awesome book.It is not one of those books which is like THEORY ,CODE, THEORY, CODE.The book is funny at many instances.there are exercises at the end which are thought provoking.9.5/10!!!
 

iamharish15

Broken In
which IDE for Java is better?

Eclipse or NetBeans ?
Though both are good, you can choose any but eclipse has better user interface and easy to use!
I personally use Netbeans 6.9.1 and I am more comfortable using it than eclipse but most programmers now choose eclipse over Netbeans due to its easier interface and some new features that Netbeans don't have!
Final Suggestion: go for Eclipse and master it! as it trending now-a-days!
 

iamharish15

Broken In
How To Design Pages in JSP using 'Drag n Drop'

I have recently been learning J2EE. I don't have much knowledge of HTML.
I want to design the pages using drag n drop. I am using Netbeans 7.
Actually our teacher is not teaching us this thing as he wants us to master the designing in coding way first but that requires the knowledge of HTML also.
So can anybody tell me how to design the web pages in JSP using drag n drop through Netbeans 7.
 
OP
furious_gamer

furious_gamer

Excessive happiness
^^ Dude, use Dreamweaver to design pages. It is by far the easiest IDE to create HTML pages, as you said, by drag-n-drop.
 

Liverpool_fan

Sami Hyypiä, LFC legend
Re: How To Design Pages in JSP using 'Drag n Drop'

I have recently been learning J2EE. I don't have much knowledge of HTML.
I want to design the pages using drag n drop. I am using Netbeans 7.
Actually our teacher is not teaching us this thing as he wants us to master the designing in coding way first but that requires the knowledge of HTML also.
So can anybody tell me how to design the web pages in JSP using drag n drop through Netbeans 7.

Not willing to learn HTML? That's massive fail. No offense. Just get a copy of Head First XHTML and CSS, it would only take a week for god sake.
 

iamharish15

Broken In
^^ Sh1t, i missed that part, but i doubt how he will work with JSP if he don't have knowledge of HTML?

Its not that I don't know HTML at all. I have the basic knowledge and I can create a page containing forms, buttons, radio buttons, text area, tables etc etc..
But I meant to say that I am not an expert in HTML, I won't be able to create the page designs as good as I want! That's why I asked about it here.

Anyways You Suggested Dreamweaver, But Can't I design the web pages in Netbeans IDE through Drag n Drop??? like Visual Studio....
 
Last edited:
OP
furious_gamer

furious_gamer

Excessive happiness
Its not that I don't know HTML at all. I have the basic knowledge and I can create a page containing forms, buttons, radio buttons, text area, tables etc etc..
But I meant to say that I am not an expert in HTML, I won't be able to create the page designs as good as I want! That's why I asked about it here.

Anyways You Suggested Dreamweaver, But Can't I design the web pages in Netbeans IDE through Drag n Drop??? like Visual Studio....

You can do that with Netbeans, but it would be not that much comfortable compared to Dreamweaver. Though if you insist, you can go for Netbeans itself, but i prefer Dreamweaver any day.
 

iamharish15

Broken In
actually my question was not to ask which IDE should I use. I wanted to know how can I use the drag n drop features(if any) to easily design the pages in jsp. And that question is still waiting for the satisfying answer!!!
I was asking like Visual Studio or Dreamweaver, can jsp pages also be designed without having to write code for each segment!
 

Garbage

God of Mistakes...
actually my question was not to ask which IDE should I use. I wanted to know how can I use the drag n drop features(if any) to easily design the pages in jsp. And that question is still waiting for the satisfying answer!!!
I was asking like Visual Studio or Dreamweaver, can jsp pages also be designed without having to write code for each segment!

*www.myeclipseide.com/module-htmlpages-display-pid-12.html

asp.net - Drap and Drop in Eclipse for Web Projects - Stack Overflow
 

iamharish15

Broken In
*www.myeclipseide.com/module-htmlpages-display-pid-12.html

asp.net - Drap and Drop in Eclipse for Web Projects - Stack Overflow
Thanks for the links, but I have been working on Netbeans, so can you please provide the same info for Netbeans...
 
Top Bottom