aybee ryu

Greenhorn
+ Follow
since Jul 19, 2011
Merit badge: grant badges
For More
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 aybee ryu

Ulf Dittmer wrote:You misunderstood: I was asking for much less code, not more code. The more code you post, the less likely it is that anyone will bother to go through it.





I just got it there if someone actually wanted to dig deeper, i guess just the important note section is good enough from the previous post then.


Important notes: The way I do it is initially the user sees self ip and hostname and he or she provided with a search button...as soon as the button is pressed a search in the current user subnet is initiated and the result is got back in 2d string array. this 2d array with other external data like (image icons and all) is used to dynamically create a panel which is set right below the search button. Again the whole thing works absolutely the way it is suppose to be in an applet form in the IDE but as soon as i import the project as a jar file from the eclipse IDE and try embedding it in a html page....only the initial state is reached (the hostaddress & name with search button) any later panels created after actionlistener doesn't show up on the page and one gets a feeling that the search button actually does nothing. Also do note the way i make jar file in eclipse:- file->export->JAR file->(select everything in the resources to export)+check export generated class files and res +check export java source files and res +<options> check compress the contents of the jar file

12 years ago
Please also note that there might be a lot of dead code, reason being it went through many iterations and this is a very pre-alpha state project.

Thanks
12 years ago

Ulf Dittmer wrote:Well, you're not exactly making it easy for us to help you. For example, what's with all the empty lines? It seems you could remove about a third of your code that does nothing but impact people's ability to comprehend it.

Also, what is "the button"? A particular one? If so, which one? What happened when you did click on it? Did the handler get called? You're implying no. I suspect yes, but it just didn't do what you thought it should be doing.

Furthermore, at a quick glance, I see two catch blocks that do precisely nothing. Unless you're generating an error message of some kind that you're guaranteed to see, that's just a recipe for trouble.






I just thought i might be messing up the way i set up my jar file with the applet or something similar, so providing more stuff would be redundant..... Please do note that the applet works absolutely fine when I run it off eclipse as an applet. The problem is when i put it up on the html....i have tried multiple browsers(just to make the compatible between different browsers thing)


Let's go over the whole project in detail.....


the primary objective of this project to find a list of small embedded servers in a local network.

files:

ui.java----->primary display of interface
FindSiteplayer.java---->the real part which finds these servers


ui.java








Important notes: The way I do it is initially the user sees self ip and hostname and he or she provided with a search button...as soon as the button is pressed a search in the current user subnet is initiated and the result is got back in 2d string array. this 2d array with other external data like (image icons and all) is used to dynamically create a panel which is set right below the search button. Again the whole thing works absolutely the way it is suppose to be in an applet form in the IDE but as soon as i import the project as a jar file from the eclipse IDE and try embedding it in a html page....only the initial state is reached (the hostaddress & name with search button) any later panels created after actionlistener doesn't show up on the page and one gets a feeling that the search button actually does nothing. Also do note the way i make jar file in eclipse:- file->export->JAR file->(select everything in the resources to export)+check export generated class files and res +check export java source files and res +<options> check compress the contents of the jar file




please let know if you need any further info or clarification + anything you would want me try out (i m following this thread hardcore, so any response can be dealt with almost immediately)

Thanks

Greatly appreciate it:)




12 years ago
nobody has an answer for this?? That is discouraging
12 years ago

Hi,

Following is the applet code below:







then the html file looks like this:





when i run the program via eclipse as an applet it runs fine, but when i put it in the html file, the init() seems to show up but the actionlistener on the button never seems to work

Any help would be really appreciated. Thanks!!

ps: will be happy to share any additional details if required
12 years ago
Hi,

I am trying to make a progress monitor bar for a long execution. The program is basically trying to scan the local network (which takes about two minutes). I have a result class which prepares a JPanel that can be placed in the UI with the results. I want to have a neat progress bar for the whole process. I did make a ProgressMonitor object with a Task class and PropertyChangeListener as of the example in:

http://download.oracle.com/javase/tutorial/uiswing/components/progress.html

http://download.oracle.com/javase/tutorial/uiswing/examples/components/ProgressMonitorDemoProject/src/components/ProgressMonitorDemo.java


so currently it is like a fake progress bar which just based on the thread sleep time. Currently my approach is create another thread in action listener class that runs the result class but for some reason I can't call back the JPanel object from asynchronously.... I tried to used the ExecutorService with FutureTask but not sure whether I am using it the right way.

A general flowchart of my current app is like

UI-->scan button-->at actionlistener for scan button creation of the swingworker for task and executorservice


||1*|| is what i what to run parallel to the progress monitor

in the above code the scan button gets clicked and stays enabled until the scan is done but the progress monitor bar never shows up.

removing ||1*|| just shows up the progress bar but ofcourse the scan never took place.

ANY HELP IN CORRECT WAY OF SETTING IT UP or USE OF A DIFFERENT APPROACH WOULD BE GREATLY APPRECIATED!!
12 years ago