Extremely Advanced applet question
hello,
I am developing a JComponent, and it works
great as long as I don't run it as an applet.
I have overloaded the add, and remove functions
that get inherited from Container. I notice
that when I run my JComponent as an applet,
it runs fine the first time, than I restart the applet.
This proceeds to add components to the JComponent
but something is calling the remove function also
and really screwing things up.
More concretely:
I have developed say a JHolder, which you can add components to. Every time you do however, I add a
brother component with it that I made called JBrother
(REMEMBER, this works fine when run except in applets).
Every time you remove a component it's respective JBrother comp is removed.(I only overload the remove(comp) function, not remove(index), and not removeAll() which work fine.
Code snippet and debug output(from add and remove functions)
JButton A = new button("A");
JButton B = new button("B");
JHolder.add(A);
JHolder.add(B);
Now, once I RESTART the applet(starting it works fine)
here is the debug trace I have...
button A is added;
button A is removed;//ahhhh, why?????
JBrother is removed;
JBrother is added;
button B is added;
button B is removed;
JBrother is removed;
JBrother is added;
This never happens in a java program, only applets, probably because you can't restart a program like in the web browser where you can go back and forward which restarts your applet instead of reloading it.
as you can see, this is really whacky? DOES ANYBODY KNOW WHAT THE HECK IS GOING ON??
I think you allready said the answer: the applet is not realy reloaded, its just restarted.
So my suggestin is, that the parent of A is still your holder, adding it to an container it will be removed from its former parent (from your holder).
You should call removeAll or something like this before adding it.
Hope this helps (I really don't know)...
Similar Messages
-
SELECT query sometimes runs extremely slowly - UNDO question
Hi,
The Background
We have a subpartitioned table:
CREATE TABLE TAB_A
RUN_ID NUMBER NOT NULL,
COB_DATE DATE NOT NULL,
PARTITION_KEY NUMBER NOT NULL,
DATA_TYPE VARCHAR2(10),
START_DATE DATE,
END_DATE DATE,
VALUE NUMBER,
HOLDING_DATE DATE,
VALUE_CURRENCY VARCHAR2(3),
NAME VARCHAR2(60),
PARTITION BY RANGE (COB_DATE)
SUBPARTITION BY LIST (PARTITION_KEY)
SUBPARTITION TEMPLATE
(SUBPARTITION GROUP1 VALUES (1) TABLESPACE BROIL_LARGE_DATA,
SUBPARTITION GROUP2 VALUES (2) TABLESPACE BROIL_LARGE_DATA,
SUBPARTITION GROUP3 VALUES (3) TABLESPACE BROIL_LARGE_DATA,
SUBPARTITION GROUP4 VALUES (4) TABLESPACE BROIL_LARGE_DATA,
SUBPARTITION GROUP5 VALUES (DEFAULT) TABLESPACE BROIL_LARGE_DATA
PARTITION PARTNO_03 VALUES LESS THAN
(TO_DATE(' 2008-07-22 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
( SUBPARTITION PARTNO_03_GROUP1 VALUES (1),
SUBPARTITION PARTNO_03_GROUP2 VALUES (2),
SUBPARTITION PARTNO_03_GROUP3 VALUES (3),
SUBPARTITION PARTNO_03_GROUP4 VALUES (4),
SUBPARTITION PARTNO_03_GROUP5 VALUES (DEFAULT) ),
PARTITION PARTNO_01 VALUES LESS THAN
(TO_DATE(' 2008-07-23 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
( SUBPARTITION PARTNO_01_GROUP1 VALUES (1),
SUBPARTITION PARTNO_01_GROUP2 VALUES (2),
SUBPARTITION PARTNO_01_GROUP3 VALUES (3),
SUBPARTITION PARTNO_01_GROUP4 VALUES (4),
SUBPARTITION PARTNO_01_GROUP5 VALUES (DEFAULT) ),
PARTITION PARTNO_02 VALUES LESS THAN
(TO_DATE(' 2008-07-24 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
( SUBPARTITION PARTNO_02_GROUP1 VALUES (1),
SUBPARTITION PARTNO_02_GROUP2 VALUES (2),
SUBPARTITION PARTNO_02_GROUP3 VALUES (3),
SUBPARTITION PARTNO_02_GROUP4 VALUES (4),
SUBPARTITION PARTNO_02_GROUP5 VALUES (DEFAULT) ),
PARTITION PARTNO_OTHER VALUES LESS THAN (MAXVALUE)
( SUBPARTITION PARTNO_OTHER_GROUP1 VALUES (1),
SUBPARTITION PARTNO_OTHER_GROUP2 VALUES (2),
SUBPARTITION PARTNO_OTHER_GROUP3 VALUES (3),
SUBPARTITION PARTNO_OTHER_GROUP4 VALUES (4),
SUBPARTITION PARTNO_OTHER_GROUP5 VALUES (DEFAULT) )
CREATE INDEX TAB_A_IDX ON TAB_A
(RUN_ID, COB_DATE, PARTITION_KEY, DATA_TYPE, VALUE_CURRENCY)
LOCAL;The table is subpartitioned as each partition typically has 135million rows in it.
Overnight, serveral runs occur that load data into this table (the partitions are rolled over daily, such that the oldest one is dropped and a new one created. Stats are exported from the oldest partition prior to being dropped and imported to the newly created partition. The oldest partition once the partition has been created has it's stats analyzed).
Data loads can load anything from 200 rows to 20million rows into the table, with most of the rows ending up in the Default subpartition. Most of the runs that load a larger set of rows have been set up to add into one of the other 4 subpartitions.
We then run a process to extract data from the table that gets put into a file. This is a two step process (due to Oracle completely picking the wrong execution plan and us not being able to rewrite the query in such a way that it'll pick the right path up by itself!):
1. Identify all the unique currencies
2. Update the (dynamic) sql query to add a CASE clause into the select clause based on the currencies identified in step 1, and run the query.
Step 1 uses this query:
SELECT DISTINCT value_currency
FROM tab_a
WHERE run_id = :b3 AND cob_date = :b2 AND partition_key = :b1;and usually finishes this within 20 minutes.
The problem
Occasionally, this simple query runs over 20 minutes (I don't think we've ever seen it run to completion on these occurrences, and I've certainly seen it take over 3 hours before we killed it, for a run where it would normally complete in 2 or 3 minutes), which we've now come to recognise as it "being stuck". The execution path it takes is the same as when it runs normally, there are no unusual wait events, and no unusual wait times. All in all, it looks "normal" except for the fact that it's taking forever (tongue-in-cheek!) to run. When we kill and rerun, the execution time returns to normal. (We've sent system state dumps to Oracle to be analyzed, and they came back with "The database is doing stuff, can't see anything wrong")
We've never been able to come up with any explanation before, but the same run has failed consistently for the last three days, so I managed to wangle a DBA to help me investigate it further.
After looking through the ASH reports, he proposed a theory that the problem was it was having to go to the UNDO to retrieve results, and that this could explain the massive run time of the query.
I looked at the runs and agreed that UNDO might have been used in that particular instance of the query, as another run had loaded data into the table at the same time it was being read.
However, another one of the problematic runs had not had any inserts (or updates/deletes - they don't happen in our process) during the reading of the data, and yet it had taken a long time too. The ASH report showed that it too had read from UNDO.
My question
I understand from this link: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:44798632736844 about how Selects may generate REDO, but I don't see why UNDO would possibly be generated by a select. Does anyone know of a situation where a select would end up looking through UNDO, even though no inserts/updates/deletes had taken place on the table/index it was looking at?
Also, does the theory that having to look through the UNDO (currently UNDO ts is 50000MB, in case that's relevant) causing queries to take an extremely long time hold water? We're on 10.2.0.3
Message was edited by:
Boneist
Ok, having carried on searching t'internet, I can see that it's maybe Delayed Block Cleanout that's causing the UNDO to be referenced. Even taking that into account, I can't see why going back to the UNDO to be told to commit the change to disk could slow the query down that much? What waits would this show up as, if any?Since you're on 10.2 and I understand that you use
the statistics of the "previous" content for the
partition that you are now loading (am I right?) you
have to be very careful with the 10g optimizer. If
the statistics tell the optimizer that the values
that you're querying for are sufficiently
out-of-range this might change the execution plan
because it estimates that only a few or no rows will
be returned. So if the old statistics do not fit the
new data loaded in terms of column min/max values
then this could be a valid reason for different
execution plans for some executions (depending on the
statistics of the old partition and the current
values used). Your RUN_ID is a good candidate I guess
as it could be ever increasing... If the max value of
the old partition is sufficiently different from the
current value this might be the cause.
Do you actually use bind variables for that
particular statement? Then we have in addition bind
variable peeking and potentially statement re-using
to consider.
I would prefer literals instead of bind variables or
do you encounter parse issues?Yes, that query runs as part of a procedure and uses bind variables (well, pl/sql variables!). We are aware that because of the histograms that get produced, the stats are not as good as we'd like. I'm wondering if analyzing the partition would be the best way to go, only that means analysing the entire partition, not just the subpartition, I guess? But if other inserts are taking place at the same time, having several analyzes taking place won't help the speed of inserting, or won't it matter?
Do you have the "default" 10g statistics gathering
job active? This could also explain why you get
different execution plans at different execution
times. If the job determines that the statistics of
some of your partitions are stale then it will
attempt to gather statistics even if you already have
statistics imported/generated.No, we turned that off. The stats do not change when we rerun the query - we guess there is some sort of contention taking place, possibly when reading from the UNDO, although I would expect that to show up in the waits - it doesn't appear to though.
Data loads can load anything from 200 rows to
20million rows into the table, with most of therows
ending up in the Default subpartition. Most of the
runs that load a larger set of rows have been setup
to add into one of the other 4 subpartitions.
I'm not sure about above description. Do most of the
rows end up in the default subpartition (most rows in
default partition) or do the larger sets load into
the other 4 ones... (most rows in the non-default
partitions)?Sorry, I mean that the loads that load say 20million + rows at a time have a specified subpartition to go into (defined via some config. We had to make up a "partition key" in order to do this as there is nothing in the data that lends itself to the subpartition list, unfortunately - the process determines which subpartition to load to/extract from via a config table), but this applies to not many of the runs. So, the majority of the runs (with fewer rows) go into the default partition.
The query itself scans the index, not the table, doing partition pruning, etc.
The same SQL_ID doesn't mean it's the same plan. So
are you 100% sure that the plans where the same? I
could imagine (see above) that the execution plans
might be different.The DBA looking at it said that the plans were the same, and I have no reason to doubt him. Also, the session browser in Toad shows the same explain plan in the "Current Statement" tab for normal and abnormal runs and is as follows:
Time IO Cost CPU Cost Cardinality Bytes Cost Plan
6 SELECT STATEMENT ALL_ROWS
4 1 4 4 4 82,406 4 1 4 20 4 6 4 HASH UNIQUE
3 1 3 4 3 28,686 3 1 3 20 3 5 3 PARTITION RANGE SINGLE Partition #: 2
2 1 2 4 2 28,686 2 1 2 20 2 5 2 PARTITION LIST SINGLE Partition #: 3
1 1 1 4 1 28,686 1 1 1 20 1 5 1 INDEX RANGE SCAN INDEX TAB_A_IDX Access Predicates: "RUN_ID"=:B3 AND "COB_DATE"=:B2 AND "PARTITION_KEY"=:B1 Partition #: 3
How do you perform your INSERTs? Are overlapping
loads and queries actually working on the same
(sub-)partition of the table or in different ones? Do
you use direct-path inserts or parallel dml?
Direct-path inserts as far I know create "clean"
blocks that do not need a delayed block cleanout.We insert using a select from an external table - there's a parallel hint in there, but I think that is often ignored (at least, I've never seen any hint of sessions running in parallel when looking at the session browser, and I've seen it happen in one of our dev databases, so...). As mentioned above, rows could get inserted into different partitions, although the majority of runs load into the default subpartition. In practise, I don't think more than 3 or 4 loads take place at the same time.
If you loading and querying different partitions then
your queries shouldn't have to check for UNDO except
for the delayed block cleanout case.
You should check at least two important things:
- Are the execution plans different for the slow and
normal executions?
- Get the session statistics (logical I/Os, redo
generated) for the normal and slow ones in order to
see and compare the amount of work that they
generate, and to find out how much redo your query
potentially generated due to delayed block cleanout.It's difficult to do a direct comparison that's exact, due to other work going on in the database, and the abnormal query taking far longer than normal, but here is the ASH comparison between a normal run (1st) and our abnormal run (2nd) (both taken over 90 mins, and the first run may well include other runs that use the same query in the results):
Exec Time of DB Exec Time (ms) #Exec/sec CPU Time (ms) Physical Reads / Exec #Rows Processed
Time / Exec (DB Time) / Exec / Exec
SQL Id 1st 2nd Diff 1st 2nd 1st 2nd 1st 2nd 1st 2nd 1st 2nd Multiple Plans SQL Text
gpgaxqgnssnvt 3.54 15.76 12.23 223,751 1,720,297 0.00 0.00 11,127 49,095 42,333.00 176,565.00 2.67 4.00 No SELECT DISTINCT VALUE_CURRENCY... -
Here's a basic question that none of the examples seem to address. If my applet is comprised of multiple jars (some dynamically loaded based on system configuration), do they all have to be signed, or does just the jar file containing the applet entry point need to be signed?
Conversely, could it be that only the jar files that contain code that wants to write files to the local file system need to be signed, or does everything need to be signed?Conversely, could it be that only the jar files that contain code that wants to write files to
the local file system need to be signedThe Stack needs to be "trusted" code. If an unsigned applet "not trusted" calls a method
of the signed applet it should not be allowed to do "trusted" things.
One example is when you call a public method of the applet from javascript. There is a
sollution other that signing all.
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post -
Hi there,
I don't know if it's good to post two questions in one post, but I think it's okay since they are just small questions.
First one: When an applet is dragged out of a browser, I have to close the browser if I want Java to ask me if I want to create a desktop shortcut. Is it possible to change this behaviour, or will it be changed in the next release?
Second question: How can I re-integrate a JavaFX-Applet into the webpage? There seems to be no other possibility than to use that default small close button provided by Java, but I'd like to call it from the code. That must be possible?Yes, I tried this, but it leads to "java.lang.IllegalStateException: Can not call FX.exit() twice".
Is there some way to do it like it is in standard java? Because there's the possibility to implement a function for the closeListener (or something like that), and then it's possible to directly call the listener to put the applet back into the page. And it hides the standard close button. Maybe we get this functionality in JFX 1.3?
I'm currently using stage.close(), but that leads to the problems I already described. -
Developing a java applet questions?
I am new to java, I want to write a java applet to do the printing for word document and pdf, is it possible, I hope that one expert can share me a good sample code .
By the way, for developing a java applet , what development environment should I install?
Thanks in advance.You can certainly generates PDF documents in Java using 3rd party, free libraries, probably .doc documents as well. Google for these and you'll find them.
You should try Eclipse and NetBeans. Both are free and widely used for Java development. -
I hope I'm asking this question right. Do any of you know if Advanced Security supports IOS module 12.4 13 on a 2811?
Hi,
For your first question about exception list: If Windows Firewall is blocking a program and you want to allow that program to communicate through the firewall, you can usually do that by selecting the program in the list of allowed programs (also called
the exceptions list) in Windows Firewall.
For the second question, that means Firewall allow your Skype to communicate through Firewall.
You can add items manually, or just choose following settings after installing or configuring first open network app:
Eg.
Kate Li
TechNet Community Support -
PDA is under the environment of Jeode, carry out applet question with swing
Purpose : Under the environment of Jeode in PDA, links APPLET webpage on websites, and APPLET is " import javax.swing. *".
Question: Not knowing the problem of how to go to solve swing bug of applet , it is unable to read webpages to cause pda.Right. Make "number" a field, and take it out of the
method signature for paint.
Because you didn't use the same signature, you didn't
override the existing paint(Graphics) method, you
just overloaded it. That means that when the GUI
thread tries to make your applet paint itself, it
calls the original paint(Graphics) method, and not
your paint(Graphics, int) method -- and so your
method never gets called.
Hi Paul,
Not to sure whether is this what you mean by above statement, i just understand the statement in bold, anyway i ammend the program , this time i declare another variable outside the init() and paint() call int num
import java.awt.*;
import javax.swing.*;
public class Draw extends JApplet
int num;
public void init()
\\ask user for input (1, 2 or 3) = String numberStr
num = Integer.parseInt(numberStr)
public void paint(Graphics page)
for (int index = 0; index < 100; index++)
switch (num)
\\ my statement code
}Anyway it works, thanks..:)
my last assigment before my exam. -
Really Need Help: Advanced Applet Needs
Dear All
I am writing a web document (HTML)
that contains MainMenu.class
The MainMenu.class will call the other class
News.class when needed.
-MainMenu.class
(to view the main menu for my site, which directs the user to other services like News.class)
-News.class
(which will comunicate with the web server to retrive new data there)
now
News.class is heavy, so I am thinking to Install it at the client machine.
but the News.class could be changed:
By Me:to modify its inner methods, or add new methods
By Client : to hack my server, or by mistake
so I thought that
MainMenu.class could have a simple logic
to check (@ machine of the client):
=>if the News.class is there (at the client machine) and not hacked by user
or changed for any reason,and is the same as the News.class
at my web server ---> the News.class will run successfully
=>if the News.class is there (at the client machine) but changed for any reason -->
the MainMenu.class will install (DownLoad and Store) the News.class from the web server.
=>if the News.class is there (at the client machine) and not changed,
but differs from the one on my webserver (I modified the News.class on my web server, new version)
-->the MainMenu.class will install (DownLoad and Store) the News.class from the web server.
if the News.class is not there (not installed before)-->
the MainMenu.class will install (DownLoad and Store) the News.class from the web server.
Any Help Highly appreciated
my question is
How to do this ?
Any IdeasI just wanted to add
what technologies do i need
- applet signing ?
- access rights ?
- how to install ????
- how to update ????
- how to check version ?
what is the order of the steps ?
Not Necesary a code ?
THANX ALL -
Westell/Airport Extreme/Airport Express question
I've read so many different options to extend a wireless network my head's spinning.
Have Westell DSL modem; Have had the Extreme also routing (but causing double NAT problems) so want to bridge it. Just got Airport Express, which I want to also put in bridge mode, connect to AEBS via Ethernet, providing wireless coverage in a distant room in the house.
Question 1:
Can both the Extreme and the Express be put in bridge mode, so that all they're doing is providing wireless coverage? I'd do all my Port forwarding in the Westell then.
Question 2: I thought I had the Express plugged into a port on the Extreme, but discovered it was actually plugged into the Westell (two wireless networks "side by side". If they're named the same, will it work that way? I would like access to the hard drive plugged into the Extreme, no matter which wireless network I'm accessing.
My suspicion is that the setup will work, but it's not *really* extending my Extreme network at all; it's just another network. All the IPs though are coming from the Westell.
I'm very confused!Question 1:
Can both the Extreme and the Express be put in bridge mode, so that all they're doing is providing wireless coverage? I'd do all my Port forwarding in the Westell then.
Yes.
Question 2: I thought I had the Express plugged into a port on the Extreme, but discovered it was actually plugged into the Westell (two wireless networks "side by side". If they're named the same, will it work that way? I would like access to the hard drive plugged into the Extreme, no matter which wireless network I'm accessing.
Is your goal to have both AirPorts be connected back to the Westell gateway by Ethernet? If so, you can configure the entire network as a roaming network. If on the other hand, you will only have the Extreme connected to the gateway by Ethernet and the Express connected to the Extreme by wireless, then you can configure the AirPorts for an extended network?
Please check out this Apple Support article on extending networks with AirPorts. -
Able to advance past question with wrong answer
The following applies to a multiple choice question in Captivate 3.0.1 Build 589. You are able to advance through a question even if you have selected the wrong answer by doing the following:
Answer a question incorrectly. A box saying "Try Again" pops up.
Press the previous button on the Captivate navigation bar to go to the previous slide.
Press the next button on the Captivate navigation bar to advance to the question slide. The incorrect answer is still selected.
Press the next button on the Captivate navigation bar while the incorrect answer is still selected.
Captivate advances, even though you have not answered the question correctly.
This is a major issue for me for two reasons. A) It allows learners to advance without demonstrating that they learned what we are trying to teach them, and B) It actually misinforms learners by letting them advance with the wrong answer selected, so they may actually believe that what they answered is correct.
Does anyone else have this problem? Anyone have any ideas how I can fix it?
Thanks very much for your help,
MarcMarc,
Do you know what wrong answer options you have selected? If you do not want the user to advance when they select a wrong answer, you can make sure they do not. On the question slides of interest, go to Edit Question. Select Options. Under "If wrong answer" section, select Infinite attempts. Now the user will not be able to advance until he/she gets the answer correct. The only side note on this is the user will get the Incorrect Answer message only one time. After that there are no response message until the correct answer is chosen. Hope this helps.
Darin -
LocalConnection Advanced use question
Does anybody know if it is actually possible to have two
flash movies talk to each other when one is in an iframe at a
different domain and one is in the page containing the iframe?
I spent quite a bit of time yesterday going through varoius
permutaions on naming the connections. The closest I got to
anythign was when I got my sender movie in Flash to successfully
talk to the reciever movie in the browser, that was accomplished
having an underscore in front fo the connection name in sender and
reciever. But when the reciever swf is in a page containing an
iframe with the sender swf nothing appears to happen.
Since I got flash player (and an executable version of the
sender) to commicate with the browser based reciever I figure this
should be possible. But i can't seem to figure out what I'm missing
in the browser based versions.
The intent of this exercise is to allow technology I am
helping to delop to be included in a page using an iframe while
providing feedback to listener movie in the site the iframe is
embedded in. From there we would provide an api for interacting
with the listener movie so that sites wishing to embed our
technology could handle certain events. I realize of course that
interframe communication between frames at different domains is a
violation of the same domain rule at the heart of most browser
security. So, I wouldn't be surprised if it isn't possible. And
yet, I could communicate between flash player and the listener so I
still wonder at the possibility.
Does anybody know if what I'm attempting is even possible?
And if so, any clues as to what may be the problem? If anybody
chooses to help with the problem or innovate a work around I would
be happy to share the source files I've been playing with, which
are simple bare bones swfs."> One more question along this topic of advanced usage
> of LocalConnections ... is there a reccomended method
> of dealing with multiple windows being open with the
> same reciever movie so that the sender movies aren't all
> sending back to the originally opened movie?
What about sending an arbitrary id as one of the parameters
with your
message? All movies listen, but when a message comes, each
movie checks to
see if the id param matches a correlating id of its own. This
could be a
variable stored in the root of each listening movie. (Am I
movie "A"? Yes?
Okay, I'll follow these instructions.)"
The problem with the arbitrary id is that I have to send it
somewhere, and I need to know the name of the connection to send it
to, but each connection name must be unique. That is why if you
open a new window messaging goes to the first window, the
connection command in the second window will fail because the name
will aready be taken in window one. And the other movies won't know
that and will all send to the named connection which is still in
window one.
The connect function will fail if a connection already
exist.s So, on the one hand all I have to have is a loop that keeps
trying to connect until it finds a free connection. The problem I
am thinking about is having two movies in the same window, one in
the page displayed, and one in an iframe, as I set up on that demo
page. I'll want the one in the iframe to communicate with the one
in the outer page for validation purposes. If all there is is one
window then that's fine. But if sombody were to hit Ctrl+N in IE
they would get a new browser window with the same page. The problem
is how to make it so that the two movies in each window know to
only communicate with each other in only that window?
My thought is that I can use the incremental connection id
technique in each movie and figure that if the increment is
firstMovie_2 in one movie then it should communicate with
otherMovie_2. What I'm worried about in this scenario though is
what happens if the user is caffienated and hits Ctrl+N five times?
Will the two movies increment correctly for each browser window? Or
will there end up a couple windows with a firstMovie_3 and
secondMovie_2 because things didn't load in a controlled sort of
way?
I think the incremental technique would be fine for if a
window closed because that would free the connection id and the
loop would always start at 0, so if you had five windows opened and
closed the first one and opened a new one, the new window would use
the ids with the _0 increment.
Anyway, its helping me to write this stuff out. I'm going to
implement the incremental id thing and I'll report my findings.
As to looking deep into the technotes and docs. That
http://www.adobe.com/devnet/flash/articles/fplayer8_security_05.html
article was great for the table it has in the middle of it which
outlines what is needed for the various ways you try to connect
movies.
My only other reccomendation is the help docs and Excedrin
since it has both Acetometaphin AND caffeine and both are useful
for trudging through the fine points of the flash docs ;). -
Help - Applet Question ???
Hi, I thought I post it yesterday, but I could not find it.
I write a simple applet as follow:
public class demoapplet extends Applet {
private StringBuffer buf = new StringBuffer(1000);
public void init() { }
public void start() {
//display start info
disp("start");
buff = processXML();
sendHTTP(buff);
//display start info
disp("end");
public void disp(string st) {
Graphics g;
g.drawString(st,10,60);
public stringbuffer processXML() { ...}
public void sendHTTP(stringbuffer buf) {... }
My question:
1. How to init Graphics object?
If I use paint method, I can not pass string variable.
2. How to send stringbuffer to another application
via HTTP?
3. Any problem I put my processXML and sendHTTP in start method? It only be called once when user load html page.
Many thanksHey Hi! david...
first of all make your questions a bit more clear,
about getting the graphics object you can get it by
Graphics g=getGraphics();
in the Applet.
Also about getting the string in the paint method of the Applet. you can declare a string variable in the class and it would be accessible in the paint method.
I first of all suggest you to get your basics right ..
regards
vikram -
I have a Airport network at home with a Time capsule connected via ethernet cable to modem. Also the network is extended wirelessley with an Airport Extreme. I now wish to add a second Airport extreme but am considering a hard wire connection with 100 ft of cat 6 cable from the Time capsule to the second Airport extreme. Can my network operate properly to extend the network with both a wireless and wired extend functionallity?
I now wish to add a second Airport extreme but am considering a hard wire connection with 100 ft of cat 6 cable from the Time capsule to the second Airport extreme.
Excellent plan.
Can my network operate properly to extend the network with both a wireless and wired extend functionallity?
Yes, but don't get confused about the second AirPort Extreme, as it would not be configured to "extend" a wireless network.....it would be configured to "create a wireless network" using the same wireless network name, security settings and password as the Time Capsule network. Configure the second Extreme in Bridge Mode.
This Apple support document will show you how to hookup and configure the second AirPort Extreme:
http://support.apple.com/kb/HT4260 -
11i Advanced Pricing Questions on usage of Item Category Segment Values
Hi All,
we are on 11i, i am trying to setup on modifiers using Item Categories. Customer has 4 segment category structure.
Category structure= Vendor, Group, Style, Price code , here is how Data looks = 060.10.800.40
In 11i, can we setup Modifiers on Segment1 & Segment 2 ( 060.10), so system picks up all values for segment3 and segment4.
I understand R12 can do this as per Metalink Note: 746020.1. is this supported in 11i.? I am unable to accomplish this.
regards
girishHi
Please donot post more questions in a single thread. If you post it separately, you will get many responses and detailed explanations from more members.
Regarding your queries.,
1. Relevant for delivery field in Item Category is for TEXT Items and for others you should configure the field in Schedule lines.
3. Shipping conditions will be defaulted from the CMR of SP. If a value exists in the sales document type (eg. OR) then it will have priority and will replace the value defaulted from CMR.
5. The pricing applies to Item Level only. But you cannot determine different procedures for different line items.
6. Header conditions will not have access sequence and you cannot create condition records for header conditions in VK11.
7. In consignment process - the first two steps are mandatory i.e., Consignment fillup and consignment issue.
The other two steps are required only if there are returns from the customer(not consignee) and if there are any unsold stocks at the consignee.
Thanks,
Ravi -
Specify Remote Location for PrintWriter (applet question)
Hello,
I am trying to use a Java applet to access a URL, read in its text content, and save it to a file. The applet is run off an online host (our school server) so I made it a signed JAR file so I could access other hosts. However, here is my problem. The applet itself is in a remote location (our school server, a unix server). I can edit the directory via SSH to add files, and these files become accessible via my homepage (where I'm running the applet from in my browser). But what I need to do is write a file IN THE SAME DIRECTORY as the applet is being run from (ie, the remote directory). But I find that when I run the applet from my browser, it instead by default saves the file I've written to in the local machine's home directory (the desktop). How can I force the applet to save/write to a file in that remote directory (I have the permissions set up on it so that non-owner can write to the directory).
Maybe this isn't possible. I wasn't sure. Here is my code:
//get URL containing the escape table
URL inputURL = new URL(inputLocation);
//make connection to the URL
URLConnection inputCon = inputURL.openConnection();
//save URL's contents as text file in same directory
BufferedReader inputStream = new BufferedReader(new InputStreamReader(inputCon.getInputStream(), "UTF-8"));
//save with same name as URL file
File file = new File(inputURL.getFile());
String filename = file.getName();
PrintWriter outputStream = new PrintWriter(new File(filename), "UTF-8"); //this didn't work either: outputStream = new PrintWriter(filename, "UTF-8");
//line of current input
String line = null;
//output text file to local text file line-by-line
while((line = inputStream.readLine()) != null)
System.out.println("line=" + line); //TEST TO MAKE SURE ACTUALLY READING FILE
outputStream.println(line);
}According to my System.out.println, it IS actually accessing the URL and reading each line from the URL's text file correctly, and outputStream.println(line) is correctly printing to the file; it's just doing it in the wrong place!
Also, I should specify: I can't hard encode the file location. It could be anywhere in my html directory. Rather, I want a way to save it in the same directory as the applet was deployed from.It's for an assignment. All our assignments have to be applets and run from our unix server. I have to access a URL and get data from it, then create that file, then use that file as a reference table for something else.
The tragic part is I think I have everything else working, but I've no way to test it, as I cannot figure out how to access URLs in jgrasp (my IDE - just running the java file itself as an applet within the IDE has the error message about being unable to connect to the URL, since the applet is not signed, but I've no way how to get around that within the IDE itself) so I am testing it directly on the server as a signed jar file so I can at least access the urls.
The requirements stated:
"make a text file (UTF-8 encoding) of the file name t in the same directory where an applet is deployed; "
# A program must be written as an applet in Java. Other programming languages such as JavaScript cannot be used.
# The applet must be deployed on the ITS Web server
I could be missing something, honestly. >_< I might have a word with the TA. I'm just really frustrated since I have everything else working.
Maybe you are looking for
-
Within our family, the 5 of us we have 11 devices: 5 ipods, 1 ipad, 3 itouches, and 1 iphone4 {+ a mac laptop} but only 1 itunes account. We are having problems logging into itunes. Friends have said our problem is either: you can only have 5 devices
-
Organizing photos...
i just started using iphoto and im sorting out all my photos and organizing them with the albums inside iphoto. thats all great but when trying to find photos to upload to my myspace they get lost inside date codes. my question is why do they not get
-
Multiple database users, ORM, entity framework, best practices
Hello everyone! You've already helped me several times, however I must ask for an advice once more. I was assigned to develop .NET application with Data Access Layer and I've decided to use Oracle Database Software to provide sample data. As I'm abso
-
Problem with special characters (umlaut)
Hi, I have a text box in my form. when I am entering the normal characters it working fine and the values are persisting quiet well in the database but when I am entering special characters (umlaut characters), it is not storing them properly in the
-
I have Mac OS X when I downloaded Firefox 3.6 I then attempted to drag the 3.6 icon into the app dock when I received a message stating I did not have sufficient privileges. Help.