Digen Mahara

Greenhorn
+ Follow
since Dec 23, 2011
Digen likes ...
Android Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Digen Mahara

As for adding images, you can't link to images on your local hard drive. The Ranch allows you to upload image attachments; just check the Attachments tab just below the post field.

7 years ago
I am trying to make a paint application and want to add undo and redo functions to it how can I do this

I have used UndoManager class with TextComponents but really confused with Containers like JPanel where you actually draw images



Please Help !!!
8 years ago
to make your textfields smaller use setPrefferedSize(new Dimension(width,height));

eg : to set the height = 25 and width= 30

8 years ago
(DirectColorModel.java:455)
at java.awt.image.DirectColorModel.getRGB(DirectColorModel.java:721)
at java.awt.image.BufferedImage.getRGB(BufferedImage.java:888)
at paint.Painter.floodFill(Painter.java:406)
at paint.Painter.floodFill(Painter.java:408)
at paint.Painter.floodFill(Painter.java:411)
at paint.Painter.floodFill(Painter.java:409)


the above is the error that gets generated

and if the stack memory gets overflow the how to stop it is there any method or technique in Java

and its not possible to keep a track of each and every pixel since in large regular/irregular shapes it is impossible

I wish I could insert the image to make my error understand better??


8 years ago
I want to use the flood fill Algorithm in my project which is a Paint Application
I searched on the Internet and got the following recursive code :


it works great with small shapes but problem arises with large shapes
alse it returns some error or exception
Please help me modify it

8 years ago
Hi everyone,
We all know jdk 1.7 has arrived will the SCJP exam be called as SCJP 6 or SCJP 7.

Shikha Upadhyaya wrote:
I now want to know how to close the parent frame automatically when the OK button is clicked.



Shikha as Michael Dunn said use the dispose() method

eg : if your parent frame is Form1 then it works like this






8 years ago

Darryl Burke wrote:

Digen Mahara wrote:You can use the nextFocusable() method i m not sure about the method's spelling but there is surely something if you are using an IDE search for such method

You can find it in JFrame class


Digen, have you ever heard of the Java API? Have you ever read the API for JFrame?



I was not sure as I mentioned, this was because I was a Former NetBeans user but later turned to Eclipse
and I think I saw it somewhere in properties window in NetBeans but I think I was Wrong and will see to it that I post proper suggesstions or codes
and try to help and understand more.
8 years ago

Darryl Burke wrote:

Digen Mahara wrote:either you fix the size of the JPanel in the JFrame or instead color the JPanel itself


As meaningless as some of your other posts. And please stop inserting empty code tags all over your responses.



Okay I admit, but I'm new to code ranch and still learing and searching its features.
8 years ago

Adam Burda wrote:I am running windows 7 64bit Home Premium with an intel core i3 and 4GB of ram. I run my java code in eather prompt or i use JCreator LE. Every time i wright an app I get a blank frame or a blank panel. But only when I put in a JTextArea or a JTextField. Buttons, CheckBoxes, and Raido Buttons all show fine. But when i add a textfield the program compiles fine then i run it. The window pop's up, but nothing on it. Unless i grab one of the sides to adjust the size of the window myself, bigger or smaller. Then the window displays the buttons, textfield...... I have tryed resizing, and using other layouts. I have no clue what the bug is. This happens with any and all code I wright.




It is a problem that most of us face

You should read the Java API.
You can also use validate() and repaint() method
But I have seen such problems with Applets
take this Sample code where i got such problems



Sorry for such a big code but this is actually where I faced the problem for JCombobox an d JButtons to appear try it and there are many bugs and it is not a full fledged Calculator
But should help you understand
Please Quote if any mistakes as I have Edited it
8 years ago
Okay Darryl is Correct : Ctrl + Tab is a good Alternative

Sorry Darryl I'll try to make my posts more meaningfull
8 years ago