harinath_2007 56 Posting Whiz

Hello..

I am developing a graphics application. I am playing a video in my application and when I press any key , it should stop currently playing video and should start displaying other images.Everything went well except when I press any key the video is getting stopped but
the screen is not getting repainted..(i.e the screen turns into black and stucks)

I thought that repaint() method is not working and but the fault is not with repaint method.
When I test the repaint method with sample code, its working but when i test the same method with my original code its not getting executed.. I am thinking that the fault is in way of
stopping the video and painting the screen again..

Any suggestions..

harinath_2007 56 Posting Whiz

You must have proper network connection (workgroup) among the computers in your network.

So check out whether the LAN connection is proper or not and workgroup is created or not.
Then you could send messages and all...

harinath_2007 56 Posting Whiz

That link tells you how to make a Window full-screen. If you know how to play a video in a Window then all you need to do is make the window full screen.

I know how to play a video in JMF. but i dont know in java application...

harinath_2007 56 Posting Whiz

You likely want to try Full-Screen Exclusive mode.

I have already seen that link before.. It all says about the various full screen modes..

I already know that and my requirement is not that..

I am searching for how to play a video in full screen application..

harinath_2007 56 Posting Whiz

Hello..

I am in search of how to play a video in full screen java application.

I already know how to play a video using the JMF.

but i want to play the video in full screen desktop java applicaton ..

harinath_2007 56 Posting Whiz

yaa ur right that was a unnoticed mistake..

File f=new File("c:\\myapplication.exe");
Desktop d=Desktop.getDesktop();
d.open(f);
harinath_2007 56 Posting Whiz

U r code contains sillly mistake..

remove the close bracket after the main method and place it at the end..

harinath_2007 56 Posting Whiz

Why r u worried about access specifier of the classes ..?

when java provides a very effective naming space methodologies(using packages)..

harinath_2007 56 Posting Whiz

Try this..

Desktop d=Desktop.getDesktop();
d.open("c:\\myapplication.exe");
harinath_2007 56 Posting Whiz

From reading all of your replies., i think that u have a virus in ur PC. so go for a better antivirus and scan your entire computer once..
If the problem still persists, then it is the time for you to re-install the windows

harinath_2007 56 Posting Whiz

Hello..

I am in search of how to play a video in full screen mode using java.

I know how to play a video using the JMF.

but i want to play the video in full screen desktop java applicaton ..


Any solution....?

harinath_2007 56 Posting Whiz

It all depends on your use and your requirements..

No IDE will change your software.. so all IDE's provide almost
same features and perfomance of IDE is not a big deal.

All that matters is perfomance of your code..

One man's crappy software is another man's full time job. ~Jessica Gaston

harinath_2007 56 Posting Whiz

Did you forgot to write your question or just the Title is your question ?

Dont expect answers by posting like this.

You need to atleast type what exactly your problem...

harinath_2007 56 Posting Whiz

I too belong to same category . If you are interested only in web based projects
then here are some lists..

http://intlegentpeopleathota.blogspot.com/2010/07/java-mini-project-titles.html

Few we thought already are, Making of a search engine from scratch, Making a web crawler etc..

If you are interested in making of search engine from scratch, let me tell u one thing.
As you know that search engine is not a small software, you will finally end up with only some functionalities.so think before u take that

My personal opinion is that you can also take some interesting network based applications where you can enjoy the real funda of java..

All the best....


"I studied every thing but never topped.... But today the toppers of the best universities are my employees"
— Bill Gates

harinath_2007 56 Posting Whiz

If i am correct that you want to create a trial software which provides only limited
functionalities and stops working after certain days(30 days..) ,
then you can use some freeware third party softwares to create them..


here is a link which is fully freeware to create trial software applications...

http://exe-trial-creator.qarchive.org/


No longer forward nor behind
I look in hope and fear;
But grateful take the good I find,
The best of now and here.
John G. Whittier

harinath_2007 56 Posting Whiz

Here's a useful link which may be helpful to you...

http://www.codeproject.com/KB/cs/Trial_Maker.aspx

harinath_2007 56 Posting Whiz

Hello

I have a java program that sends mail to given gmail account.

Now i need to attach some files to mail and send them.

how can i do it??

harinath_2007 56 Posting Whiz

did you mean programming concepts or computer concepts.?

Because computer concepts are no where related to programming unless you handle
assembly langugages and al..

In my view a programmer who is perfect in programming concepts(syntax,semantics..) can code any sort of software..

harinath_2007 56 Posting Whiz

You realize that captcha is designed to thwart OCR engines, right? Tesseract in particular is pretty weak as an OCR engine and would likely have an extremely poor read percentage on all but the worst of captchas. The only thing going for it is being open.

I know that till date there is no software or program developed which is capable of reading
captcha..

but there are some softwares which can create any number of captchas. (then why not we atleast TRY to develop that reads ca..)


So my intend is to know whether any technology exists which supports building those and are there any related stuff regarding that.

Think posiA positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort. ~Herm Albright, quoted in Reader's Digest, June 1995

harinath_2007 56 Posting Whiz

hsuan,
let us assume that the default color of keys on your painted keybord is red, and that when you press a key on your keyboard, the color is changed to blue.

say now that you press key D and it turns blue on your screen. do you want it to stay blue until you press another letter, or do you just want it to stay blue for a few moments and then turn back to red regardless if you press another key?! let me know, and I'll give you an idea.

Hey...

I too developed similar typing tutor few months ago and i too encountered the same..

but the thing is did you use an image to show what key is press??. If so, then you need to

have all images which shows every key pressed . when the keys are pressed you should

repaint the picture with appropriate one

harinath_2007 56 Posting Whiz

Hello..

I wonder if there is any program (in any platform) that reads captcha.??

harinath_2007 56 Posting Whiz

By using getResourceAsStream rather than File operations as the images within the jarfile are no longer "files" in and of themselves and so cannot be accessed through "File" classes (such as File, FileInputStream, FileChannel, or the Image operations that take a file as a parameter).

so can u just show how to load an image from the jar file..

harinath_2007 56 Posting Whiz

Hello..

I created a executable jar file for my java application..
but there's a problem that the images are not being displayed in application eventhough
i included images in jar file along with classes.

How to make them displayed from the jar file only instead of accessing them
from any folder or something..

harinath_2007 56 Posting Whiz

when a variables's value changes does it create an event, if so, what could I use to detect it?

Change in value of variables does not create a event .

But every GUI application can be well handled through events..

However ,in case of non-GUI application

Instead of checking the value of variable again and again

write the code which you need to execute when a variable value is changed and

call that function when the value changes.

check this condition

if(b==true)
{
valueChanged();
}

harinath_2007 56 Posting Whiz

EDIT: My problem was solved. :)
But I have a doubt, what is the most effective way to wait for something to happen in java?
for example, if I want to wait for a boolean b to be true, does this below work?

while(!b) {}
//stuff to do after wait here

or is it more effective to use a Thread and sleep some time before checking again? Or is there another way?

OLD SOLVED STUFF:
Hey, I'm developing a game in which you control a ball with your mouse and you must avoid hitting some rectangles that keep rising in number. While trying to write the scores to a file, I came across a very strange problem. When I add some lines in my code, to wrtie the score to a file, the collision detection stop working!!

I think the most effective way to make a program wait is using handling EVENTS..

harinath_2007 56 Posting Whiz

Hi all,

I have recently begun learning java at uni and have encountered, what appears to be, a somewhat unusual problem. Every time I install JDK6 and BlueJ onto my home computer (running win7x64) I suddenly lose the ability to copy files.

At first I thought it was just a virus or some such thing as I could not copy anything for a couple of days, I restored my computer back 2 weeks using my weekly back up, I then re-installed JDK6 and blueJ (They where the only 2 things which I needed to install and had changed in the last 2 weeks) and I now find myself unable to copy and past anything again.

Any help with this would be greatly appreciated, I have tried googling this but have found nothing and I am open to suggestions other than JDK6 being the problem so feel free to let me know any opinions you may have.

Thanks

Hey..

I am sure that its NOT problem of JDK .. but its problem of your bluej.

There are many good IDE's like eclipse ..

so Try another IDE other than blueJ..

harinath_2007 56 Posting Whiz

Hello..

I made a java chat application which transfers files from between server and client.

The thing is that i used sleep() method to make the progressbar go slow.

I want the progress bar to progress according to the progress of work done..

I dont know about EventQueue ...


Any solutions....?

harinath_2007 56 Posting Whiz

see my new post

harinath_2007 56 Posting Whiz

setValue(..) on the vertical scroll bar.
How did the textarea border idea work? - I like it better.

Here's the picture when i add the border. the border is not visible since the scrollbar doesn't move down

The 1st image is what i am getting when i add the border


But i want my border to be appear as present in the 2nd image..

harinath_2007 56 Posting Whiz

setValue(..) on the vertical scroll bar.
How did the textarea border idea work? - I like it better.

The textarea border is working but the JScrollBar n is not scrolling down when the border is

added. however the scrollbar scrolls when the text is added.

harinath_2007 56 Posting Whiz

If the border solution doesn't suit, then I guess you will need to move the viewport explicitly down a few lines after appending text.

how can i move the view port down ??

harinath_2007 56 Posting Whiz

OK, I understand that, thanks.
But I'm stll confused by
"i want the newly added text to be at the top (or somewhere middle but not bottom) of the TextArea."
or when you said "TextArea"did you mean "scrollpane viewport", and the text is always appended at the bottom of the text area??

yes i mean the view port

harinath_2007 56 Posting Whiz

I'm confused. You want to insert the new text (eg) at the top while automatically scrolling to the bottom so the user doesn't see the new text? Maybe we need a more precise description of the desired insert/scroll behaviour.

the JScrollBAr should be scrolled in such a way that the text should appear in the just below the center of the JTextArea and remaining bottom part leaving empty.

it is not compulsory that the scroll bar should scroll completely bottom

my intention is that the user should see a small lines of space after the end of the appended text.

harinath_2007 56 Posting Whiz

Did you try

DefaultCaret caret = (DefaultCaret)textArea.getCaret();
caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);

?

Thanks for your help.

I tried it and its working

but i want the newly added text to be at the top (or somewhere middle but not bottom) of the TextArea.

how to fix it ?

harinath_2007 56 Posting Whiz

You should use the Thread.sleep() method in your code to make the progress Bar go slowly.


extend your class with Thread class and write all the code in run() method and then call the

sleep()method.

then you can make the progress bar go slowly....

harinath_2007 56 Posting Whiz

hey

what is randomNmber in ur code?

post full code instead of a part..

harinath_2007 56 Posting Whiz

hello

I developed a chatting application with GUI.

when the TextArea is full and if any new text is added, the JScrollBar will not scroll
down automatically.

I struggled a lot to make it scroll automaticaly but ended with dashing hopes


how to make the JScollBar to scroll down automatically.


i will be thankful for any help..

harinath_2007 56 Posting Whiz

Hi. i am using java launcher from 1 year. its a freeware.


it says that the edition is expired.

i tried re-installing it but it says the same

how to fix??

harinath_2007 56 Posting Whiz

"copy the path of rt.jar file and set the class path in environmental variables"

WRONG. Not needed, not recommended, don't do this.

Setting the classpath will make the jdk to know where your class files are.


The CLASSPATH variable is one way to tell applications, including the JDK tools, where to look for user classes. (Classes that are part of the JRE, JDK platform, and extensions should be defined through other means, such as the bootstrap class path or the extensions directory.)


The advantage of classpath is you can create your own package and can use as part of
those packages that available in java ..


*****************

Setting the classpath doesn't mean that it is wrong..

harinath_2007 56 Posting Whiz

can anyone say how to use java in windows 7
I installed it but its not working.
i am unable to compile a java program.
please help me in solving this problem.


i am getting this message in command problem when i use javac

"'javac' is not recognized as an internal or external command,
operable program or batch file."

please help me

You need to set the path of the java in the environmental variables inorder to compile
and run the java programs..


Go to the folder where java installed and copy the path of the bin folder

for ex. In my system , java is installed C drive.

C:\Program Files\Java\jdk1.6.0\bin;

set the bin folder path to the environmental variables path

Now find the rt.jar file in the jre\lib folder .

C:\Program Files\Java\jre1.6.0\lib\rt.jar;.;

copy the path of rt.jar file and set the class path in environmental variables

now you can compile and run the java programs..

enjoy java programming

harinath_2007 56 Posting Whiz

What do you want it to look like? A line of * or @ could be used.

What libraries i should use to use the OS functions ????

harinath_2007 56 Posting Whiz

What do you want it to look like? A line of * or @ could be used.

I want it just as it is like in java with gui...

harinath_2007 56 Posting Whiz

Here's an excellent software for recovering deleted files

Its of less size around 3MB and just install it and try it..

It has good success rate of recovering lost data..

http://www.pandorarecovery.com/download/

harinath_2007 56 Posting Whiz

Hi all,

I am currently trying (and now wondering if) you can add multiple threads to a program to do the same job? Basically I am writing a web crawler for a search engine and it adds many URLs to an ArrayList which is used as a queue. I add a few links to start and open each with jsoup, checking if each link is in the queue and if not adding it (to have it's links taken out). This process works but ends up at about a queue of 3000 before it starts working down. Can I add multithreading to my program to end it quicker? I have used multi threading before but not in this context and am unsure where to start. I am happy to post my program if needed (the whole thing is only about 70 lines long). Thanks

Threads are mainly used for independent tasks and cannot be used for same task.
However if u are interested in doing so , proper synchronization between all those threads should be maintained . It depends on your logic and your program modules dependency

harinath_2007 56 Posting Whiz

Hello.. I have windows 7 ultimate 32 bit .
i installed a software "ANU SCRIPT" which allows me to type in different languages..

This application runs well in WINDOWS XP but it is not working in WINDOWS 7..

I am not using any virtual pc because of that windows genuine update.

Can anyone suggest how to fix this..

harinath_2007 56 Posting Whiz

Hello, i am looking for creating a progess bar in c application..

I know how to create it in JAVA but i want it in C..

harinath_2007 56 Posting Whiz

Hi,
I have managed to assemble the following but how do I convert the Raster result to an Image type?

public Raster transform(Image img, float alpha) {
    BufferedImage bi = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);
    bi.getGraphics().drawImage(img, 0, 0, null);
    RasterOp rop = new RescaleOp(new float[] { 1.0f, 1.0f, 1.0f, alpha }, new float[] { 0.0f, 0.0f, 0.0f, 0.0f }, null);
    //BufferedImage fImage = new BufferedImage(bi.getWidth(), bi.getHeight(), bi.getType());
    Raster result;
    result = rop.filter(bi.getData(), null);
    return result;
    }

I dint understand why do u need image object

because if you want to save that image you can directly use WritableRaster class..

harinath_2007 56 Posting Whiz

i have this code, i need to have for() inside this boolean method,
but it shows an error that return method is missing.
how can i solve it?

public static boolean findPrevious(int dataIdx, int featIdx, String data, String[][] array){
        for(int i=0; i<dataIdx; i++)
        {
            if(array[i][featIdx] == data)
                return false;
            else
                return true;
        }    
    }

thanks ^^

Hey.. ur code has logical errors...
just return the boolean value after the for loop

public static boolean findPrevious(int dataIdx, int featIdx, String data, String[][] array){

boolean flag=true;

for(int i=0; i<dataIdx; i++)
{
for(int i=0; i<dataIdx; i++)
{
if(array[featIdx] == data)
return false; //break statement cannot be used after returning a value.

}
return flag;
}
}

Read some SCJP books and try to solve some logical questions...

I assure you that u will become confident in Core java after reading that books

I can also send u some scjp soft copies if you would like..

harinath_2007 56 Posting Whiz

This would depend on the kind of video... A flash video? HTML 5?? What Codecs?? AVI? WMV? MP4? What kind.. There is no specific code to play every single type of video that exists..

any video file like .avi or .swf file etc..

harinath_2007 56 Posting Whiz

can anyone give code for a simple java speech recognition program...