Gabriel Belmont

Greenhorn
+ Follow
since May 18, 2014
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gabriel Belmont

Jacob Draper wrote:I was getting the spaces myself. If you notice, the array you are creating is of length 75. Count the spaces and maybe you will see it's the same? Maybe you are converting that entire array to a String (including those elements that are blank). Change that array to something else say 25 and see what you get!

Hopefully that points you in the right direction.

Also, I agree with Andrew as far as formatting. A few returns and indentations could make it much easier for others to read your code. I didn't get crazy but at least put gaps between your methods So it didn't all just look like one big block.



Thanks.What you said was right.The problem is due to array length.Resolved it myself.Cheers!
9 years ago

Andrew Monkhouse wrote:
I had to reformat your code in order to read it.

I'm not sure what we are doing differently, but it works for me:

Perhaps you can copy/paste your command line output so we can see what I are doing differently to you?



I am sorry.I just started my java Programming.I will try to cultivate some good programming styles.Now coming to my code,here is my command line output.Please take a look

9 years ago
I just can't figure out the faulty behaviour of my code.Tried my level best to fix it but still no progress.Whenever I give input string say like "Something Something(Tutorial)",I expect my code to produce "SS(T)".It does generate "SS(T)" but there appears to be huge space between SS and (T).Can anyone please tell me what is causing this anomaly?
9 years ago

Campbell Ritchie wrote:Welcome to the Ranch
It isn't called Swings.
You need to start small; you cannot expect to design a large GUI like that until you have designed simpler things.



Thanks for welcome.Yes indeed.I shall remember your words.
9 years ago

Rob Camick wrote:

Start by reading the Swing tutorial, especially the sections on:

1. How to Use Border Layout - this will allow you to put your buttons on the left and the other panels in the center.
2. How to Use Card Layout - this will allow you to add all the panels in the center and then swap them, depending on the button pressed.



Thanks for your reply.As you said,Card Layout is the required element for me.
9 years ago
I am doing a project in Java.Well,the thing is I am not sure about how to make a perfect GUI which will appeal everyone.Anyway as of right now,I am planning to have my GUI which is similar to that of Kaspersky's.But problem is I don't understand how to design it.Just like in Kaspersky Internet Security, I would like to have my options available on left and upon clicking any of those,I would like dynamical content corresponding to those options to loaded in target area.How do I achieve this?Browsed around for quite a while but still was clueless.So anyone kind enough to provide a answer?My apologies,still a beginner in Swings.
9 years ago