How to set an applet to invisible?
Hello,
I need my applet only for the communication between a java program and my html page but I do not need a grapical represantation of the applet. Is there a way to hide my applet?
My first try was to set width and height to 0.
<applet name="pkcs11" code=TestSmartCard.class width="0" height="0"></applet>
The method setVisible(false) within the constructor didnt work too.
public TestSmartCard() {
setVisible(false);
Any ideas?
Thanks,
Ralph
I found a solution
<applet id="applet_name"
code="path_to_applet_class/class_name"
style="width: 1px; height: 1px; float: left;"
mayscript></applet>
see ... http://windyroad.org/2006/08/14/reintroducing-javascript-and-hidden-applets-jaha/
Similar Messages
-
How to set a sub-role invisible from the role
Hi guys,
Our roles are as following:
Role1
App1
App2
SubRole1
SubApp1
SubApp2
We've assigned SubRole1 to Role1, but we don't want it is shown under Role1, how to set it?
Many Thanks and Best Regards,
Xiaoming YangHi,
If you do not need these applications/iViews in the navigation hierarchy, then you do not have to do any fancy tricks.
If all Role1 users should get subRole1 iViews, then just have one role and make those iViews invisible.
If you want to be able to assign the iViews in subrole1, just create a second role with no entry point (it does not need to be a subrole) and set the permissions so there is no end user permission, and then assign it to users.
Hope that helps.
Daniel -
Scrollbar Component - how to set the arrows to invisible
Hello Forum
I'm trying to save some coding time by using the flash
component scrollbar.
Is there a way to tun off the visibility of the arrows. The
designer wants
only the scroll thumb (is that the right term?)...
I've imported the component assets into the library and
started to apply
different colors. But the background of the arrow and the
thumb seem to be the
same.
Can this be scripted instead?
Any ideas?
Thanks
StephankIf you removed them you should be able to drag them back on again. I was not sure they were a feature that could be removed but I did just try and confirm they are removable. They may show up slightly differently when in the customise options compared with how they display once in position on the toolbar.
If necessary use the 'restore default set' button from within the customize menu, or even the safe mode option.
See also
* [[how do i customize the toolbars?]]
* [[back and forward or other toolbar items are missing]] -
How to set an applet's maximum size?
Hi there
If Applet inherits Panel, and Panel is a Container and a Container is a Component, why using the method "setMaximumSize(Dimension d)" (of class Component) in an applet (or JApplet) always gives a compiling error saying it does not recognize this method?
I apperciate your helpI found a solution
<applet id="applet_name"
code="path_to_applet_class/class_name"
style="width: 1px; height: 1px; float: left;"
mayscript></applet>
see ... http://windyroad.org/2006/08/14/reintroducing-javascript-and-hidden-applets-jaha/ -
How to set a layer invisible?
Hi guys,
Can you tell me how to set a layer invisible? Thanks.function hideAllLayers()<br />{<br /> forEach(document.layers, function(layer) {<br /> layer.visible = false;<br /> });<br />}<br /><br />function showAllLayers()<br />{<br /> forEach(document.layers, function(layer) {<br /> layer.visible = true;<br /> }); <br />}<br /><br />function forEach(collection, fn)<br />{<br /> var n = collection.length;<br /> for(var i=0; i<n; ++i)<br /> {<br /> fn(collection[i]);<br /> }<br />}
-
How to set focus on invisible input field?
Hi Guys,
I need an invisible input field and have to set an input focus on it. My problem is that if I set input fields property visible=blank, I get my invisible field <b>BUT</b> the function call doesnt work (setInput.requestFocus()).
I suppose that I cant set a focus if an input field is invisible.
Does somebody know how can I solve my problem? Is there a possibility to do this input field invisible with java script? If yes, how does it work in Web Dynpro?
Thanks
MaritaHi
Setting a focus on invisible input field will not work even if you follow the method what sowjanya has suggested. The method wdThis.wdGetAPI().requestFocus() will not work for read-only and disabled fields.
By the way why do you want to set the focus on a invisible input field. If you can tell us the requirement maybe we could think of an alternate solution. But i guess for the current scenario setting focus on invisible input field does not work.
regards
ravi -
How to set FOCUS on applet (java-plugin)
I wrote applet using Java 1.3.1, using swing clasess.
I use java-plugin, defined in <object ..> and <embed ..> tags as described in documentation,
with MAYSCRIPT parameter and ID and NAME parameters defined.
How to set up focus on this applet through JavaScript?
I have tried:
document.embeds[0].focus()
document.applets.MyApplet.focus()
document.objects.MyApplet.focus()
document.objects[0].focus()
document.MyApplet.focus()
But nothing works in my IE5.x or NC4.7. Applet itself works fine.
Is some special methods need to be defined in JApplet to catch the focus?
Thanks for any advice.I wrote applet using Java 1.3.1, using swing clasess.
I use java-plugin, defined in <object ..> and <embed
..> tags as described in documentation,
with MAYSCRIPT parameter and ID and NAME parameters
defined.
How to set up focus on this applet through
JavaScript?
I have tried:
document.embeds[0].focus()
document.applets.MyApplet.focus()
document.objects.MyApplet.focus()
document.objects[0].focus()
document.MyApplet.focus()
But nothing works in my IE5.x or NC4.7. Applet itself
works fine.
Is some special methods need to be defined in JApplet
to catch the focus?
Thanks for any advice.With IE you should try the following:
<OBJECT id='MyApplet' ...
document.MyApplet.requestFocus();
This worked fine for me, even without specifying additional "MAYSCRIPT" or "scriptable=true" tags. Obviously this construct managed to call the public Java method "requestFocus()" from JavaScript.
Maybe something similar would also work for Netscape. I felt no need to do this when running in Netscape, because the Netscape browser handled focus management without problems.
For IE I tried to workaround a problem mentioned by several people in this forum: The focus will not be regained by an applet when the user switched form IE to another application and then returns back to the browser window which contains the applet.
Unfortunally the following code fragment worked only partially well:
function activated()
if (isIE)
document.MyApplet.requestFocus();
return true;
window.onfocus = activated();
OnFocus is invoked only each second time when the browser window gains back focus.
I'm still looking for a real solution, so I'd appreciate if anybody could come up with one.
Hope this helps a bit
Bernd -
How to set IIS for Applet making it can run at any IE client.
I made an applet with java. It works fine under JDK.
After that, I made a web page with the applet embedded in.
But it can only run on those client computers if the computers has installed JDK.
Could you tell me how to set IIS so that my applet can run on all the client computers no matter whether they have JDK installed or not?It would have nothing to do with IIS. Your applet apparently requires a "newer" version of Java than what comes with the browser by default. So either make your applet comply with the lowest common denominator (no Swing classes, only AWT, for example), or require your clients to install the newer Java plugin.
-
How to set scrollbar to visible or invisible?
Dear all,
How to set scrollbar to visible or invisible?
ThanksDuncan's answer will solve your problem
but how will you display scrollbar thru stacked canvas if your block is already in one stacked or tab page canvas
so better to create an item set its background color exactly same as your canvas and make bevel property to null and keep that item where you are displaying scrollbar
and set its visible property to true or false based on your requirement -
How to set button INVISIBLE in standard component FITV_POWL_ASSISTANT
Hi Team,
My requirement is to set buttons INVISIBLE of standard component. I have enhanced component and view. But i am not able to set the button to invisible. properties of the UI elements are in read only mode.
Can some one suggest me.
Thanks & Regards,
Sankar GeliviHi Sankar,
You can do it as below
Approach1:
Enhance the view , use, post exit of WDDOMODIFYVIEW( ) and set the visible property of button as below
lo_btn->set_visible( cl_wd_button=>e_visible-none ).
Aproach2:
Enhance the view
Go to the button ( ui element tree ) and right click and chose the "Remove Element" as below
Note: you can undo the element deletion if required
Approach3:
use the personalization/customization either by using admin mode or application configuration.
Hope this helps you.
Regards,
Rama -
I am trying to create a Frame, using BorderLayout and every time we click the center button, it will change the color in one of the region. But I dont know how to set up the loop to make it change one at a time. Below is my draft......Thanks for helping.......
Test.java
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends Applet implements ActionListener
Color []color={Color.red,Color.blue,Color.black,Color.green};
private Button nb=new Button("North Button");
private Button sb=new Button("South Button");
private Button eb=new Button("East Button");
private Button wb=new Button("West Button");
private Button cb=new Button("Center Button");
int buttonCount=0;
public void init()
setLayout(new BorderLayout());
add(nb,"North");
add(sb,"South");
add(eb,"East");
add(wb,"West");
add(cb,"Center");
cb.addActionListener(this);
buttonCount=0;
public void actionPerformed(ActionEvent e)
for (int i=0;i<color.length;i++)
buttonCount++;
if (buttonCount%2==0)
nb.setBackground(color);
if (buttonCount%2==1)
sb.setBackground(color[i]);declare a public variable count;
int count=0;
public void actionPerformed(ActionEvent e)
buttonCount++;
count++;
if(count==color.length)
count=0;
if (buttonCount%2==0)
nb.setBackground(color[count]);
if (buttonCount%2==1)
sb.setBackground(color[count]);
hope you got it. -
How to set portal authorization in ABAP Webdynpro application
Hi All,
Do you have an idea how to set the visibility for Group UI element based on the Portal user authorization in ABAP Webdynpro , for example if the portal user A(or group A), logins into the portal on click of the ABAP Webdynpro IView then we need to set invisible (hide) the Group UI element in webdynpro ABAP Application.
Do you have any sample code on the same to handle the portal authorization in Webdynpro ABAP?? , please let me know if couldnu2019t understand this requirement or my explanation
Thanks,
PortalUser100Hi Kris,
Thanks for your reply.
Like however we passed the UserID, can we pass Group ID also to the ABAP Webdynpro application??
Can u get me other things, how to copy of the existing component and i want to give the new name for the component and there i need to modify, i dont want to disturb original component before copy...let me know the procedure for the same??
Regards,
PortalUser100 -
How to set swing to support using vrml/external/browser ?
When doing applets with AWT to call vrml/external/browser.getbrowser, it works. But if update to use swing instead of awt, applets always cannot say: java.lang.NoClassDefFoundError: vrml/external/Browser.
The html file containing this applet is converted by command : java HTMLConverter **.html .And also using java1.3.1plug-in.
But if removing java plug-in and add ---ARCHIVE="Swing.jar"---- into **.html source code without using java HTMLConverter. The applet works.
While, this way can let applet work, but thus, the applet cannot connect to mysql database.
So, anyone knows how to set up swing in applet when using converted **.html with javaplugin? ???
Thanks so much!!!!Hi David,
Need more info:
Version of Crystal Reports are you using?
Visual Studio version?
Try with this:
The following C# code demonstrates the use of the ExportToStream method:
ReportDocument report = new ReportDocument();
report.Load("c:\\temp\\test.rpt");
ExportOptions options = new ExportOptions();
options.ExportFormatType = ExportFormatType.PortableDocFormat;
options.FormatOptions = new PdfRtfWordFormatOptions();
ExportRequestContext req = new ExportRequestContext();
req.ExportInfo = options;
Stream s = report.FormatEngine.ExportToStream(req);
Response.ClearHeaders();
Response.ClearContent();
Response.ContentType = "application/pdf";
s.Seek(0, SeekOrigin.Begin);
byte[] buffer = new byte[s.Length];
s.Read(buffer, 0, (int)s.Length);
Response.BinaryWrite(buffer);
Response.End();
Regards,
Shweta -
How to set memory size for JRE
hi all,
Is there anyone know how to set the JRE memory size?
My run my applet application onto browser and I want to increase to size of memory. Such as -ms 128m -mx256m.
please help.
regards,
elvisThe suggestion could be convert applet into WebStart application which is quite similar to applet (at least
it is distributed similar way, resides within sandbox etc) but allows to specify memory size as you requested. -
How to sign java applet policy to end user?
i have putted my applet class on server, i want all end users can access it on server, how to sign the java.policy to there JRE?
can anyone help me?I found this some where else. It shows how to sign an applet.
START OF DOC
How To Sign a Java Applet
The purpose of this document is to document the steps required to sign and use an
applet using a self-signed cert or CA authorized in the JDK 1.3 plugin.
The original 9 steps of this process were posted by user irene67 on suns message forum:
http://forums.java.sun.com/thread.jsp?forum=63&thread=132769
-----begin irene67's original message -----
These steps describe the creation of a self-signed applet. This is useful for testing purposes. For use of public reachable applets, there will be needed a "real" certificate issued by an authority like VeriSign or Thawte. (See step 10 - no user will import and trust a self-signed applet from an unkown developer).
The applet needs to run in the plugin, as only the plugin is platform- and browser-independent. And without this indepence, it makes no sense to use java...
1. Create your code for the applet as usual.
It is not necessary to set any permissions or use security managers in
the code.
2. Install JDK 1.3
Path for use of the following commands: [jdk 1.3 path]\bin\
(commands are keytool, jar, jarsigner)
Password for the keystore is any password. Only Sun knows why...
perhaps ;-)
3. Generate key: keytool -genkey -keyalg rsa -alias tstkey
Enter keystore password: *******
What is your first and last name?
[Unknown]: Your Name
What is the name of your organizational unit?
[Unknown]: YourUnit
What is the name of your organization?
[Unknown]: YourOrg
What is the name of your City or Locality?
[Unknown]: YourCity
What is the name of your State or Province?
[Unknown]: YS
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=Your Name, OU=YourUnit, O=YourOrg, L=YourCity, ST=YS, C=US
correct?
[no]: yes
(wait...)
Enter key password for tstkey
(RETURN if same as keystore password):
(press [enter])
4. Export key: keytool -export -alias tstkey -file tstcert.crt
Enter keystore password: *******
Certificate stored in file tstcert.crt
5. Create JAR: jar cvf tst.jar tst.class
Add all classes used in your project by typing the classnames in the
same line.
added manifest
adding: tst.class(in = 849) (out= 536)(deflated 36%)
6. Verify JAR: jar tvf tst.jar
Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/
68 Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/MANIFEST.MF
849 Thu Jul 27 12:49:04 GMT+02:00 2000 tst.class
7. Sign JAR: jarsigner tst.jar tstkey
Enter Passphrase for keystore: *******
8. Verifiy Signing: jarsigner -verify -verbose -certs tst.jar
130 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/MANIFEST.MF
183 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/TSTKEY.SF
920 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/TSTKEY.RSA
Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/
smk 849 Thu Jul 27 12:49:04 GMT+02:00 2000 tst.class
X.509, CN=Your Name, OU=YourUnit, O=YourOrg, L=YourCity, ST=YS, C=US
(tstkey)
s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope
jar verified.
9. Create HTML-File for use of the Applet by the Sun Plugin 1.3
(recommended to use HTML Converter Version 1.3)
10. (Omitted See Below)
-----end irene67's original message -----
To make the plug-in work for any browser you have two options with the JDK 1.3 plugin.
1) Is to export a cert request using the key tool and send it to a CA verification source like verisign.
When the reponse comes back, import it into the keystore overwriting the original cert for the generated key.
To export request:
keytool -certreg -alias tstkey -file tstcert.req
To import response:
keytool -import -trustcacerts -alias tstkey -file careply.crt
An applet signed with a cert that has been verified by a CA source will automatically be recognized by the plugin.
2) For development or otherwise, you may want to just use your self-signed certificate.
In that case, the JDK 1.3 plugin will recognize all certs that have a root cert located in the JDK 1.3 cacerts keystore.
This means you can import your test certificate into this keystore and have the plugin recognize your jars when you sign them.
To import self-signed certificate into the cacerts keystore, change directory to where the JDK plugin key store is located.
For JDK 1.3.0_02: C:\Program Files\JavaSoft\JRE\1.3.0_02\lib\security
For JDK 1.3.1: C:\Program Files\JavaSoft\JRE\1.3.1\lib\security
Import your self-signed cert into the cacerts keystore:
keytool -import -keystore cacerts -storepass changeit -file tstcert.crt
(the password is literally 'changeit')
Now, regardless of which method you use, the applet should be recognized as coming from a signed jar. The user can choose to activate it if he / she chooses. If your applet uses classes from multiple jars, for example Apache's Xerce's parser, you will need to sign those jars as well to allow them to execute in the client's brower. Otherwise, only the classes coming from the signed jar will work with the java.security.AllPermission setting and all other classes from unsigned jars will run in the sandbox.
NOTE: Unless otherwise specified by the -keystore command in all keytool and jarsigner operations, the keystore file used is named '.keystore' in the user's home directory.
The first time any keystore is accessed (including the default) it will be created and secured with the first password given by the user. There is no way to figure out the password if you forget it, but you can delete the default file and recreate it if necessary. For most operations, using the -keystore command is safer to keep from cluttering or messing up your default keystore.
Maybe you are looking for
-
GL Balance Report output not Matching with Material Stock
Hi, Can we Match Reports MB5B (Stock on Posting Date) and S_ALR_87012301 (G/L Account Balance)??? Till March these reports are matching but from April 11, data not matching.. In tcode MB5B, we are looking Valuated Stock of Materials and in tcode s_a
-
Calling a Function inside a procedure
Can you call a function inside a procedure?...if so....how?
-
Where do you stand on variable naming in your application code?
Just out of curisoity really, I've worked in a number of places over the years and encountered multiple coding styles. Just thought I'd throw it out there and see what your personal preferences are for variable naming?? I've seen a lot just use v_ fo
-
An error occurred while running scripts from the package "ztb343812063996219254.pkg
i tried to upgrade my os lion 10.7.5 to os x yosemite on my macbook pro and in the middele of downloading I'm getting this notice: an error occurred while running scripts from the package "ztb343812063996219254.pkg help me please-.. i think i have pr
-
Change ASM DISK NAME in 11.2 version
Hi, Is it possible to change ASM DISK NAME for example in diskgroup DATA01. I added disk without NAME, and system-choosen NAME is allocated. Can I set it to e.g., ORCL:DATA09 . Currently its DATA09_009. Please suggest your views. Thanks a lot. Best R