Dividing the applet in 2 sections
Hello
I have a really simple game in applet. Game runs fine, at the bottom i want to add a scrollbar which will have a textArea in it. So basically i want to divide the applet in 2 parts...top part the game and bottom part the scrollbar. Any tips on how to do this?
I want the game to run in size (450,500) and then extend the applet's y cordinate by 200 more and in that extra area add the scrollbar. My game is using the init method. When game is over and player double clicks the applet to start the game over....the init method is called again. So i dont think i can add the scrollbar in the init method. Maybe i have to make 2 differnt classes? one for the game and one for the scrollbar? but out of those which will run the final applet?
As u can tell...kind of confused here. Any help would be appreciated
the init() method would not be called. The init() method of the applet is
called automatically when the Applet is loaded.
you can simply ruse the scrollbar...when the new game start..just set the visibility of the scrollbar to false (so to hide the scrollbar)
when you need the scrollbar..just set its visibility to true
for example
public class Game extends JApplet{
private JScrollBar scrollbar;
private JTextArea txtArea;
private Box mainPanel;
public void init(){
// create the component once
scrollbar = new JScrollBar(); ...
txtArea = new JTextArea();
mainPanel = Box.createVerticalBox();
mainPanel.add(txtArea);
mainPanel.add(scrollbar);
initComponent();
public void initComponent(){
showScrollbar(); // hide the scrollbar
txtArea.setText(""); // clear the text area..so a new game will have a blank textarea
public void showScrollBar(){ scrollbar.setVisible(true); }
public void hidesScrollBar(){ scrollBar.setVisible(false; }
}
Similar Messages
-
How to divide the Prompts window in sections?
Hello,
I'm a beginner in Web Intelligence and BO, I have a report with a lot of prompt filters, I want to divide the Prompts window in sections, Is that possible? I'm using web intelligence to generate my reports.
Thank you,
MarcelaHi,
Yes this is possible by using the concept of cascaded prompts in universe.
Tools - List of Values - Create cascading list of values.
In webi, you would see the prompts on same screen and in the same order you selected the list of values.
Thanks,
Jayendra. -
Description:
A specific group of users/customers (using Windows7 OS with IE and FireFox web browsers) are facing problems with retrieving the applet File, after they upgraded the JRE on the system(PC) to JRE 1.7.0_25-b17 from JRE version 1.6.0_29-b11.
With JRE 1.7.0_25-b17 it is noticed that when the Java plugin requests for the applet File; it sends a request to the Domain Controller of the user, which causes a delay of 2 to 5 minutes and sometimes hangs. The problem occurs consistently.
The current temporary workaround for this group of users is to use JRE version 1.6.0_29-b11.
Problem analysis:
To investigate the problem the below steps were executed:
1) Collected the Java console outputbelow details from the user's system. (The complete output is not posted due to lengthy content, though can be added further to this post if required.)
(a) Works fine with JRE version 1.6.0_29-b11. Kindly refer to Java console output in the code ‘section A’ towards the end of this post.
(b) The problem occurs with problem with JRE version 1.7.0_25-b17. Kindly refer to Java console output in the code ‘section B’ towards the end of this post. The step where the problem is observed, is indicated as(##<comment>##).
2) The network settings in the user's browser was checked. Internet Options > Connections > LAN setting
The configured option is 'Use automatic configuration script' and the value is http://www.userAppX.com/proxy.pac
This configuration remains the same irrespective of the JRE version in use.
3) The network settings in the Java Control Panel was checked.
The used/selected option is "Use browser settings", although values for 'Use proxy server' and 'use automatic proxy configuration script' are filled-in as 'user-proxy.com' and 'http://www.userAppX.com/proxy.pac' respectively.
This configuration remains the same irrespective of the JRE version in use.
4) The proxy PAC file was checked and debugging was done for the request 'https://myAppletHost.com/download/...'. The FindProxyForUrl function (including the conditions defined in it, for the hostname and domain checks) returns PROXY user-proxy.com:80
5) The user also tried the below
a. Changed the option in the network settings in the browser to 'Proxy server' with Address 'user-proxy.com' and Port '80'
b. Restarted the browser.
c. Tried with Java Plug-in 1.6.0_29, JRE version 1.6.0_29-b11. There was no problem and no request to the Domain Controller of the user.
d. Tried with Java Plug-in 10.40.2.43, JRE version 1.7.0_40-b43. The problem occurs with the delay and a request to the Domain Controller of the user is observed.
Kindly refer to Java console output in the code ‘section C’ towards the end of this post.
6) The user also tried setting the below property in the Java Control panel; restarted the browser, and try with JRE 1.7.0_40-b43. The problem stil persists.
-Djava.net.preferIPv4Stack=true
7) The Global Policy Management of the Domain Controller was verified by the user. It has GPO for proxy setting but nothing related to Java security.
Questions:
The problem seems be specific to a particular (user) environment setup, and the user faces the problem when using JRE 1.7.
We would like to know if the issue is in the (user) environment setup or in JRE 1.7.
Could you please help with information/ideas/suggestions to identify the root cause and solution for this problem?
Section A:
Java Plug-in 1.6.0_29
Using JRE version 1.6.0_29-b11 Java HotSpot(TM) Client VM
User home directory = C:\Users\userA
basic: Plugin2ClassLoader.addURL parent called for https://myAppletHost.com/download/myApplet.jar
network: Connecting https://myAppletHost.com/download/myApplet.jar with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-b1bb5056c5b0e83f=2; Path=/"
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-b1bb5056c5b0e83f=2; Path=/"
security: Loading Root CA certificates from C:\Program Files (x86)\Java\jre6\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files (x86)\Java\jre6\lib\security\cacerts
security: Loading SSL Root CA certificates from C:\Program Files (x86)\Java\jre6\lib\security\cacerts
security: Loaded SSL Root CA certificates from C:\Program Files (x86)\Java\jre6\lib\security\cacerts
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Loading certificates from Internet Explorer ROOT certificate store
security: Loaded certificates from Internet Explorer ROOT certificate store
security: Checking if certificate is in Deployment denied certificate store
network: Connecting https://myAppletHost.com/download/myApplet.jar with cookie "JSESSIONID=0000IK4bEMoqXH10zsl88rwvoRI:175oe9tjd; BCSI-CS-b1bb5056c5b0e83f=2"
network: Downloading resource: https://myAppletHost.com/download/myApplet.jar
Content-Length: 403.293
Content-Encoding: null
Dump system properties ...
https.protocols = TLSv1,SSLv3
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 20.4-b02
javaplugin.nodotversion = 160_29
javaplugin.version = 1.6.0_29
javaplugin.vm.options =
os.arch = x86
os.name = Windows 7
os.version = 6.1
trustProxy = true
deployment.proxy.auto.config.url = http://www.userAppX.com/proxy.pac
deployment.proxy.bypass.local = false
deployment.proxy.http.host = user-proxy.com
deployment.proxy.http.port = 80
deployment.proxy.override.hosts =
deployment.proxy.same = false
deployment.proxy.type = 3
deployment.security.SSLv2Hello = false
deployment.security.SSLv3 = true
deployment.security.TLSv1 = true
deployment.security.mixcode = ENABLE
Section B:
Java Plug-in 10.25.2.17
Using JRE version 1.7.0_25-b17 Java HotSpot(TM) Client VM
User home directory = C:\Users\userA
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@12adac5
basic: Plugin2ClassLoader.addURL parent called for https://myAppletHost.com/download/myApplet.jar
network: Connecting https://myAppletHost.com/download/myApplet.jar with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-2d4ce94a2ae7b460=2; Path=/"
network: Connecting http://10.x.x.xx:53/ with proxy=DIRECT
(##THE ABOVE REQUEST CAUSES THE DELAY OR HANGS##)
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-2d4ce94a2ae7b460=2; Path=/"
security: Loading Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loading SSL Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loaded SSL Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Loading certificates from Internet Explorer ROOT certificate store
security: Loaded certificates from Internet Explorer ROOT certificate store
network: Connecting https://myAppletHost.com/download/myApplet.jar with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-2d4ce94a2ae7b460=2; Path=/"
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-2d4ce94a2ae7b460=2; Path=/"
network: Connecting https://myAppletHost.com/download/myApplet.jar with cookie "JSESSIONID=0000UQuXWY5tjxjpwcKHlfJKe_8:175oe9j45; BCSI-CS-2d4ce94a2ae7b460=2"
network: ResponseCode for https://myAppletHost.com/download/myApplet.jar : 200
network: Encoding for https://myAppletHost.com/download/myApplet.jar : null
network: Server response: (length: -1, lastModified: Thu Feb xx yy:yy:yy CET 2013, downloadVersion: null, mimeType: text/plain)
network: Downloading resource: https://myAppletHost.com/download/myApplet.jar
Content-Length: -1
Content-Encoding: null
Section C:
Java Plug-in 10.40.2.43
Using JRE version 1.7.0_40-b43 Java HotSpot(TM) Client VM
User home directory = C:\Users\userA
basic: Plugin2ClassLoader.addURL parent called for https://myAppletHost.com/download/myApplet.jar
network: Connecting https://myAppletHost.com/download/myApplet.jar with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-1d67c8b6508ca09c=2; Path=/"
network: Connecting http://10.x.x.xx:53/ with proxy=DIRECT
(##THE ABOVE REQUEST CAUSES THE DELAY OR HANGS##)
network: Checking for update at: https://javadl-esd-secure.oracle.com/update/blacklist
network: Checking for update at: https://javadl-esd-secure.oracle.com/update/blacklisted.certs
network: Checking for update at: https://javadl-esd-secure.oracle.com/update/baseline.version
network: Connecting https://javadl-esd-secure.oracle.com/update/blacklist with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Connecting https://javadl-esd-secure.oracle.com/update/baseline.version with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Connecting https://javadl-esd-secure.oracle.com/update/blacklisted.certs with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
security: Loading Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loaded Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loading SSL Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
security: Loaded SSL Root CA certificates from C:\Program Files (x86)\Java\jre7\lib\security\cacerts
Dump system properties ...
https.protocols = TLSv1,SSLv3
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 24.0-b56
javaplugin.nodotversion = 10402
javaplugin.version = 10.40.2.43
os.arch = x86
os.name = Windows 7
os.version = 6.1
trustProxy = true
active.deployment.proxy.auto.config.url = http://www.userAppX.com/proxy.pac
active.deployment.proxy.bypass.local = false
active.deployment.proxy.http.host = user-proxy.com
active.deployment.proxy.http.port = 80
active.deployment.proxy.same = false
active.deployment.proxy.type = 3
deployment.browser.path = C:\Program Files (x86)\Internet Explorer\iexplore.exe
deployment.proxy.auto.config.url = http://www.userAppX.com/proxy.pac
deployment.proxy.bypass.local = false
deployment.proxy.http.host = user-proxy.com
deployment.proxy.http.port = 80
deployment.proxy.override.hosts =
deployment.proxy.same = false
deployment.proxy.type = 3
deployment.security.SSLv2Hello = false
deployment.security.SSLv3 = true
deployment.security.TLSv1 = true
deployment.security.TLSv1.1 = false
deployment.security.TLSv1.2 = false
deployment.security.authenticator = true
deployment.security.disable = false
deployment.security.level = HIGH
deployment.security.mixcode = ENABLE
PS:
Since the JRE 1.7.0_25-b17 update, it is noticed that when the Java plugin requests for the applet File; it sends a request to the Domain Controller of the user, which causes a delay of 2 to 5 minutes and sometimes hangs.
The problem occurs consistently, and also with JRE 1.7.0_45-b18.
Java Plug-in 10.45.2.18
Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM
User home directory = C:\Users\userA
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
cache: Initialize resource manager: com.sun.deploy.cache.ResourceProviderImpl@134a33d
basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@1971f66
basic: Plugin2ClassLoader.addURL parent called for https://myAppletHost.com/download/myApplet.jar
network: Connecting https://myAppletHost.com/download/myApplet.jar with proxy=HTTP @ user-proxy.com/194.xxx.xx.xx:80
network: Server https://myAppletHost.com/download/myApplet.jar requesting to set-cookie with "BCSI-CS-f797d4d262467220=2; Path=/"
network: Connecting http://10.x.x.xx:53/ with proxy=DIRECT
network: Connecting http://10.x.x.xx:53/ with proxy=DIRECT
(##THE ABOVE REQUEST CAUSES THE DELAY AND SOMETIMES HANGS##)My organization is experiencing very similar problems. We have resolved it through several steps.
We upgraded the client to Java 8 and we saw in the console that the hanging connection with the Domain Controller no longer occurs. This may be all that is necessary for your environment as well. -
How can i change the position and size of the applet
dear fellows,
how can i change the position and size of the applet in which form is running over the web.
thanx
MochooYes, you can add the following line to your formsweb.cfg section :
HTMLbodyAttrs=onLoad='javascript:self.moveTo(100,100)'
if you are in SEPERATEFRAME = FALSE
Or Set_Window_Property( FORMS_MDI_WINDOW, POSITION, X, Y ) ;
if you are in SEPERATEFRAME = TRUE -
What is up with the Help and Support Section for Business Catalyst?
It has been very difficult for my customers and myself to access the help and support section of the site for Business Catalyst issues as we are constantly diverted to non-related Abode issues. The portal for support on Business Catalyst issue needs to be ISOLATED from ADOBE's main support section. It is bad enough that there are so many issues to deal with, but to add all the issues for all the applications is simply impossible to decipher and discover a solution.
Before the Adobe integration on the Cloud services it was much more simpler, wiith a much more efficient and cleaner layout, now every page looks like its generated by a bot that doesn't understand what I am looking for. Even the actual URL of the page is hidden so I can't even book mark it without opening the frame in a new window. My clients will not know how to do that.
Simplify plesase!
TeejayTeejay,
Yes we are looking into this very thing and hope to improve this very soon. Not only making things a bit clearer but also a central location for all your BC support needs.
Kind regards,
-Sidney -
JLable components not being displayed in the panel of the applet
I am having the problem with the display of the JLabel components in the Panel component of the Applet.
The JLabel components do not appear in the Panel of the applet unless i minimize or maximize the applet.hello...
i just had the same problem... it was solved by using the .updateUI() method.
in my case several textFields were dynamically added to a jpanel, there we called the method on that panel.
ptf.updateUI();
hope it works.
----------++-----+
...algun dia todos seremos luz...
-zoe -
Help Needed - FusionFx Style - How do I remove the Dashboard Grey Box Section, so that Dashboard Background is Blank
We like FusionFx Style but would like to keep the background white like blafp style.Can you be a little more descriptive on what you need here and explain what exactly you want to be changed.
-
Enter Key is not being accepted properly in the Applet
We have developed a Telnet application which is in form of an Applet. We are facing some problems with respect to that.
We are using Java 1.2.
When login sessions are launched, the login prompt is displayed.
After we enter the user id and press the "Enter" Key, the UI remains at the "user id" prompt and is not accepting the "Enter" Key.
As a result, we are not getting the password prompt and hence NE UI is not deing displayed.
This was verified with logs and found that the "Enter" key was interpreted as "char 7" instead of Ascii char 10(Enter Key).
This problem was observed in both IE and Netscape.
But this same code works fine when it is run as a Java application. Also the same applet works fine when viewed from the Applet Viewer.
Iam of the view that the issue may be due to the restrictions imposed by the browsers on the Java Applet.
Please give me suggestions to circumvent this problem ,if u have faced the same.
Thanks in advance,
DarshanThe reason why ENTER doesn't work is because it's reserved for the default button. The SPACEBAR does what you want.
http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/doc-files/Key-Metal.html#JButton
To change the key mappings, read up on JComponent.getActionMap(), JComponent.setActionMap() and the ActionMap class. -
Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?
Thanks Kelly,
The answers would be the following:
1200 cells per custom section (NEW COUNT), and up to 30 custom sections per spec.
Assuming all will be populated, and this would apply to all final material specs in the system which could be ~25% of all material specs.
The cells will be numeric, free text, drop downs, and some calculated numeric.
Are we reaching the limits for UI performance?
Thanks -
I can't get some song on my iphone they work off of the computer but they wont show up on my phone they are in the "on my iphone" section but they gray and have a gray dotted circle next to them i have tried every thing I just want them on my phone HELP!!!
You have posted to the iTunes Match forum, which your question does not seem to be related to. Is your question concerning iTunes Match or syncing with iTunes via USB?
-
I put songs onto my IPhone 4, and they show up under the "On This Phone" section in itunes, but when I go to play the songs on my phone, they aren't there. How can I fix this?
When you look at your iPhone, are you looking in the Music app or in the iTunes app? Be sure you are looking in the Music app, and look in the Songs category. If your songs are not here, you may want to try syncing your information again through iTunes. To do this, uncheck "Sync Music" and then click apply or sync in the bottom right corner of iTunes, and then recheck "Sync Music" and then click apply or sync again.
I hope this helps! -
I'm freaking out because almost all my music except for those songs purchased directly from the iTunes store has been deleted from my iPod - about 35 gigs. The songs show up, but they're all faded out and unplayable from my device (I have the newest version). Exclamation points appear beside all my songs in the "On this iPod" section, and yet I can't double-click to locate the files as nothing pops up. Some of my music has a weird circle next to it and is even more faded out when I'm in the "On this iPod" section - that's been happening for a couple of days. Yesterday I tried to set my settings to sync with my library only, and it worked, but this morning everything got even worse with the rest of my songs disappearing. What's happening???? Help??
The syncing of music is one way, computer to phone. See this helpful document from a fellow user. Credit goes to the author.
https://discussions.apple.com/docs/DOC-3141 -
I am trying to setup my ipad 2 but I can't get back to the wi-fi connections section. How do I get there, nothing is working.
The Wi-Fi connections section is in Settings > Wi-Fi
If the home screen is not visible tap the Home button, the button on the front of your iPad that has the rounded square in it. Once you reach the Home screen swipe through the screen of apps until you find the Settings app. Tap Settings and go to Wi-Fi.
If your iPad is completely non responsive, try a restart.
Press and hold the Home button and the Sleep button simultaneously ignoring the red slider. Keep holding until the Aple logo appears and your iPad will restart.
The sleep button is on the side of your iPad on the side opposite from the Home button. -
I am having trouble with iMessage being activated. It has worked up until yesterday and now won't activate and is saying no address in the send and receive section. My number is there but not ticked. Any suggestions on how to fix this? I have shut down my phone, but still no luck!
iMessage and FaceTime went down yesterday for some people. Mine is still down. My iMessage is saying the same thing about being activated. Sounds like you are still down too. Ignore the status page that says everything is fine - it lies.
-
Closing the Applet when I exit the form
I am deploying an application on web plataform using Forms Server 6i. I have created my own base.html with a logo and a menu as appropiate. I am using Oracle JInitiator to run the forms. When I run a form, the applet is loaded in a frame created in my base.html. All is working fine, but, when I exit the form, I supposse the applet it's still there, because in the page a gray rectangle still remains. I would like to have a background image in the page, and when I close the form, the applet was unloaded, so I can view the background again. How can I get that.
Thanks.
P.D.: Sorry but my english it's not so good.Make a new project and import old one into this new one.
See if you can find a up to date Auto Save.
Also make a habit of 'Save A Copy' to a different drive after each edit session. Save A Copy does not overwrite after so many times as Auto Save does.
Maybe you are looking for
-
ABAP-Logic/Command: Execute An Expression Stored In A Variable
Consider the following code - <b>Is it possible to execute the statement/expression stored in variables expression1, expression2 and expression3?</b> The result should be: sum = 5 , subname = 'First' & i_output should be sorted by lifnr and ebeln. *-
-
How do I mirror AppleTV TO multiple iPads?
I would like to stream (Airplay) AppleTV content to multiple iPads around my house. Is that possible? Thanks for any intel and/or ideas that any of you have.
-
i've seen two displays being used as one display (applications can be dragged from one screen to the other, pretty much making one big screen) on a power mac g5. so i was wondering if this is possible with a powerbook screen. thanks
-
Updating Oracle table with info from Sybase query
I hope this is the correct forum for this question. I am fairly new to Java and JDBC. I am trying to figure out what the best method for updating information in Oracle tables with data from a Sybase table. I would prefer to use Oracle's transparent g
-
Hi friends, There is Problem in mvt. type 202. I issue material to consumption from Warehouse by mvt.type 201 say 10 nos. Later when user identifies that by mistake he has issued more material than required. Now when he reverses the entry by mvt. typ