sachin upatil

Greenhorn
+ Follow
since May 17, 2010
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 sachin upatil

Hello ,

Doing a animation. Want to show image as it print pixel by pixel.
i write a following code into paint method.

Problem is it not showing image pixel by pixel. But it showing complete image after finishing for loop.

How i can do this ? want to printImage pixel by pixel
6 years ago
Problem solved ....

First i converted image as Binary : if getRGB if RGB = 255: pixel = 0 else 1

Do operation on it then setRGB() : if result 1 = setRGB black else white.


6 years ago
I want to do this logical operation (as shown in image screenshot) on binary image ?

I did it using BufferedImage. I take the each pixel from two images and do logical operation on that pixel and setting that pixel.(used getRGB and setRGB).
the result i get attached as LogicalOPeration.

what's wrong with AND and OR operation in my result ?
6 years ago

In Java How to do logical operation on Image ?

e.g ANDing, ORing ....
6 years ago
I tried it using for loop but it not working. it's showing complete tree.

which is any other option i can try ?
6 years ago
i did it. now i can draw binary tree using following method




But now i want to display this tree node by node using Thread like animation.
6 years ago
Hello ,

I have created a huffman tree with Node using Comparable interface. working fine.



Also i calculated the depth of tree. and i can travel though tree using following method.



but now i want to display this tree on Jpanel like binary tree as follow :

A
/ \
/ \
B C

How i can achieve this ???
6 years ago
i am showing a animation of algorithm.
so i want the display of circle,line and rectangle in sequential manner.

like first i am showing START rectangle then LINE and then another RECTANGLE.
so how should i put this in paint method.

i tried delay but not working.
7 years ago
i am drawing a line successfully. in that after reaching at a particular X value i enabled flag and then drawing a circle. now after this circle i want to draw another line.

but all this i am doing in paint method. so circle and second line is appearing at a same time.

but i want it as first circle should appear and then second line.
How should i do this ? how should i use flag for this ?
7 years ago
Hi,

I am Animation a using applet.

I have some sequence to show. after drawing a line i have to draw a circle and then line.

So using swing.timer i draw a first line(increasing X and repaint). now how should i draw circle and another line in sequence which feel as a animation.
7 years ago
HI,

I Designed one applet. When i open that applet in Firefox on windows xp its showing good, But if same applet i open in Firefox on ubuntu/Linux , some text of applet showing Bigger font.

What is wrong ?
8 years ago
Hi,

I want Gradient Color background for JTextPane....

I tried this.



in this code gradient is working fine. But JTextPane is not showing any Text on it.

What is wrong with this code ?
8 years ago
HI Petar,

Thank you.

i did it.

in java we have Graphics2d.ROTATE method.

Using this method we can rotate a circle.

-sachin
8 years ago
Petar,

Thank you.

But i am trying to rotate circumference of circle. It's like a fixed wheel at center which is rotating.

-sachin
8 years ago