Click a button in an applet application to call up or open another window.
Please, kindly show me how to call up or open an applet window(written in a seperate file) by clicking a button in an applet application.
Thanks
Alam Winner Ikenna
import java.awt.*;
import javax.swing.*;
/*<HTML>
<Applet code = "Qualification.class" Height = "400" width = "400"></Applet>
</HTML>*/
public class Qualification extends JApplet
JPanel p, p1, p2, p3, p4, p5, p6, p7;
JLabel heading, grad, grd, sh, uni, grs, tda, sco, toe, detrd;
JButton b;
JTextField tgrad, tgrd, tsh, tuni, tgrs, ttda, tsco, ttoe, tdetrd;
GridBagLayout gbl;
GridBagConstraints gbc;
public void init()
p = new JPanel();
p1 = new JPanel();
p2 = new JPanel();
p3 = new JPanel();
p4 = new JPanel();
p5 = new JPanel();
p6 = new JPanel();
p7 = new JPanel();
gbl=new GridBagLayout();
gbc=new GridBagConstraints();
p =(JPanel)getContentPane();
p.setLayout(gbl);
heading = new JLabel("QUALIFICATION DETAILS:");
grad = new JLabel("Graduation Degree Program:");
grd = new JLabel("Grade");
sh = new JLabel("School");
uni = new JLabel("University");
grs = new JLabel("Graduate Record Examination (GRE) Scores");
tda = new JLabel("Test Date:");
sco = new JLabel("Score(%)");
toe = new JLabel("TOEFL Score (If required):");
detrd = new JLabel("Details of Recent Hounors and Awards:");
tgrad = new JTextField(20);
tgrd = new JTextField(20);
tsh = new JTextField(20);
tuni = new JTextField(20);
tgrs = new JTextField(20);
ttda = new JTextField(20);
tsco = new JTextField(20);
ttoe = new JTextField(20);
tdetrd= new JTextField(20);
b = new JButton("SUMBIT");
gbc.gridwidth=GridBagConstraints.REMAINDER;
gbl.setConstraints(heading, gbc);
p.add(heading);
gbc.anchor = GridBagConstraints.CENTER;
gbc.gridwidth = 1;
gbc.weightx = 0;
gbl.setConstraints(grad, gbc);
p.add(grad);
gbc.gridx = 2;
gbc.gridy = 1;
gbl.setConstraints(tgrad, gbc);
p.add(tgrad);
gbc.gridx = 4;
gbc.gridy = 1;
gbl.setConstraints(grd, gbc);
p.add(grd);
gbc.gridx = 6;
gbc.gridy = 1;
gbl.setConstraints(tgrd, gbc);
p.add(tgrd);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 0;
gbc.gridy = 2;
gbl.setConstraints(sh, gbc);
p.add(sh);
gbc.gridx = 2;
gbc.gridy = 2;
gbl.setConstraints(tsh, gbc);
p.add(tsh);
gbc.gridx = 4;
gbc.gridy = 2;
gbl.setConstraints(uni, gbc);
p.add(uni);
gbc.gridx = 6;
gbc.gridy = 2;
gbl.setConstraints(tuni, gbc);
p.add(tuni);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 0;
gbc.gridy = 4;
gbl.setConstraints(grs, gbc);
p.add(grs);
gbc.gridx = 2;
gbc.gridy = 4;
gbl.setConstraints(tgrs, gbc);
p.add(tgrs);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 0;
gbc.gridy = 5;
gbl.setConstraints(tda, gbc);
p.add(tda);
gbc.gridx = 2;
gbc.gridy = 5;
gbl.setConstraints(ttda, gbc);
p.add(ttda);
gbc.gridx = 4;
gbc.gridy = 5;
gbl.setConstraints(sco, gbc);
p.add(sco);
gbc.gridx = 6;
gbc.gridy = 5;
gbl.setConstraints(tsco, gbc);
p.add(tsco);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 0;
gbc.gridy = 6;
gbl.setConstraints(toe, gbc);
p.add(toe);
gbc.gridx = 2;
gbc.gridy = 6;
gbl.setConstraints(ttoe, gbc);
p.add(ttoe);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 0;
gbc.gridy = 7;
gbl.setConstraints(detrd, gbc);
p.add(detrd );
gbc.gridx = 2;
gbc.gridy = 7;
gbl.setConstraints(tdetrd, gbc);
p.add(tdetrd);
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.gridx = 6;
gbc.gridy = 8;
gbl.setConstraints(b, gbc);
p.add(b);
}Edited by: [email protected] on Apr 8, 2009 1:16 PM
[email protected] wrote:
Can an applet have an actionPerformed method in it and if it does, do I need to write the code in an actionPerformed method ?Sure it can. Yes if you implement from the ActionListener interface, you must override the actionPerformed method.
Secondly, The (new URL("otherApplet.html"), "_NEWWIN"); What does this stand for? It means open the html file "otherApplet.html" in a new window named NEWWIN. NEWWIN can be replaced by any name you want.
Because, the compiler complained about URL, saying that, is not a class.You need to import the URL class from java.net package.
Similar Messages
-
Letting user to click a button and run an application
Hi all,
I'm trying to do this: once the user logged on, the user can click a button to run an application. If it's the first time he/she use it, it'll let user to download the program and then run it. How can I do that?
Thank you.
CalFind out about Java Web Start.
-
I am running XP SP2 fully patched. I recently upgraded to 3.6.3 and since then, clicking on an icon that normally would open another windows (for example, a printer-friendly version of the current web page), nothing happens. In these situations, I have been forced to go to IE or Crome in order to accomplish what I need to do. Very frustrating. Also clicking in the slider area has no effect. "Page Up" and "Page Down" keys work. Holding down left mouse button on slider works. Also very frustrating. Can someone help
== This happened ==
A few times a week
== Upgraded to 3.6.3.Many thanks.
With those symptoms, I'd try the following document:
Apple software on Windows: May see performance issues and blank iTunes Store
(If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.) -
When I click on the iphoto icon on my shelf it does not open the window. The iphoto options are found across the top of the computer but no window. Any reason?
I fixed it, thanks.
-
Just dl FF 6.x. I finally found the Bookmarks drop down by adding the Menu bar. Now, I want to click on "Bookmarks" and then simply scroll down my list of bookmarks in the dropdown. As it stands now, I have to click on "Show All Bookmarks" or "Unsorted Bookmarks" just to be able to get to my bookmarks. A huge wate of time and effort. Any way to do this like the "old way". Or I as I say it, the way that works?
The Bookmarks sidebar is the same organization PLUS providing the same ability to search on strings within titles and url as you have on the Location Bar drop-down (AwesomeBar features).
To see the same on the sidebar
* Bookmarks Toolbar - - don't expand
* Bookmarks Menu -- Expand just one level, collapse sub-levels below that -- looks same
* Unsorted Bookmarks -- don't expand
Same organization, don't see how you can be lost. You may prefer the always collapsed Bookmarks (menu).
To put things back to how you were used to, which is more efficient and takes up the same amount of space if you use styling in addition to steps 1-10 when compared to the inadequately featured poorly designed 4.0 style.
You can make '''Firefox 6.0.2''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
* http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface
There is a lot more beyond those first 10 steps listed, if you want to make Firefox even more functional.
<br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small> -
Can't open files from an application by dragging the file from another window
In Mac os x 10.6, i was able to to open a file by simply dragging it and placing it on the 'open' Window which automatically changes the location to where the dragged file is. Ever since updating to Lion, i'd have to go folder by folder from the 'Open' window until i get to where the file is and selecting it.
iI tried it with so many applications Like When i'm sending a file via bluetooth, i tried opening a file with iTunes too by dragging to see if it'll work, it didn't. I tried uploading a Photo to facebook too by dragging it to the select photo window, it didn't work.
-
I recently updated to Firefox 4. Now my Norton password protection does not work; My hotmail view on my MSN home page does not work; and my stock updates to not work. I have to click on "hotmail" to see if I have new e-mails and click on "stock quotes" to see updated stock values. Prior to the "upgrade", my new emails could be viewed on my MSN homepage as well as my stock prices. Does anyone know why this is occurring?
I was able to fix the issue here. Steps Taken: From the comand line I ran
dscl /Search read /Users/jdoe HomeDirectory
It returned # No such key: HomeDirectory
This was the big clue.... it should have returned
HomeDirectory: <home_dir><url>afp://files.hihllc.lan/Users/jdoe</url><path>/</path></home_dir>
I unbound the Mac from AD and ran the following command in terminal.
dscacheutil -flushcache
I then went into OS X sharing preferences and renamed the computer slightly, so it would create a new computer record in AD. I rebound the machine to AD making sure in Directory Utility Advanced, under User Experience that Force local home directory on start up disk was unchecked and Network protocol to be used was AFP.
I then ran
dscl /Search read /Users/jdoe HomeDirectory
and it returned
HomeDirectory: <home_dir><url>afp://files.hihllc.lan/Users/jdoe</url><path>/</path></home_dir>
I had the user reboot... which was necessary. When he logged in HomeSync fired up. He had quite a few conflicts, so I told him to select use files on this computer for all conflicts.
I checked the FileSyncAgent.logs and it was good.
Let me know if this fixes your issue.
Thanks,
Ray -
It won't just restore my iPod. It opens a little window asking me to open something else. I don't know what it is that I'm supposed to open so I can't restore my iPod. What do I do?
Iss it possible that you are "right clicking" on the mouse? Go to System Preferences / Mouse and check the settings there are correct?
-
I have not been able to get onto the net through Firefox for several weeks. Each time I try to get on, I get this exact message "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." If I restart I get the same message. I really like Firefox so I'd like to solve this situation.
See these articles for possible solutions:
*[[Firefox is already running but is not responding]]
*http://kb.mozillazine.org/Profile_in_use -
Is there any way to use RUN button to deploy the application and open IE...
Hi
Thank you for reading my post
i used to use Run button to compile / deploy and run (opening the browser to project context path) .
i want to know is there any way to use RUN button to deploy an application to standalone OC4J and opening browser?
I know that we can define ear or war deployment profiles and use them to deploy the application to stand alone server , but i want a single click solution.
thanksHello,
Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
Then perform these steps:
*Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
*In the Firefox options window click the ''Advanced'' tab, then select "General".
*In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
*Now, restart Firefox and see if the problems persist.
Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
* [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
* [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
Did this fix your problems? Please report back to us!
Thank you. -
Open a new window when a user clicks a button
Hello!!
I have the following problem, I have a table with a button, and when the user clicks the button, I want to open a new window, I don't know how to set the button so that it opens another window...
Does anybody have an idea of how to do this??
thank you in advanceHi,
Following thread may help you
http://forum.sun.com/jive/thread.jspa?forumID=123&threadID=53654
MJ -
My bridge pause all the time. I have to wait 30 seconds after selecting a picture or click the right button of the mouse. I have installed a new windows 8.1, and a fresh CD6. But still these problems in Bridge. No problems in Photoshop. What to do
What is the problem:
When I choose a picture in Bridge I have to wait 20 till 30 seconds (sometimes more).
When I choose with right click of the mouse. I have to wait the same time.
When I choose the menu. Also
After opening the picture(s) in Camera RAW. There are no problems
In Photoshop there are also no problems. Everything works all right.
Only Bridge have these problems. But I can’t work with it.
My Computer
HP Z820 with double CPU Type Mobile Intel Celeron M, 2000 MHz
Nvidia Geforce GTX 980 card
System memory 64 Gb
Windows 8.1 Home Edition
All software is up to date, incl BIOS
DirectX 4.09.00.0904 (DirectX 9.0c)
Lots of space on my disc drives
Software: Adobe Master Collection. But only installed Photoshop and Adobe Acrobat
Installation done with my original DVD of Adobe. All software updated
But still problems
Software installed again (including Windows).
Now installed adobe from a download version from adobe.
Still the same problems
I have no illegal software!
Multimedia
Geluidskaart SB Recon3D PCIe Audio Controller
Opslag
IDE apparaat Standaard Dual Channel PCI IDE Controller
SCSI/RAID apparaat Controlefunctie voor opslagruimten van Microsoft
SCSI/RAID apparaat Intel(R) C600 Series Chipset SAS RAID (SATA mode)
SCSI/RAID apparaat Intel(R) C600 Series Chipset SATA RAID-controller
SCSI/RAID apparaat LSI Adapter, SAS2 2308 Mustang
Harde schijf ATA Samsung SSD 850 SCSI Disk Device
Harde schijf ATA SAMSUNG SSD 830 SCSI Disk Device
Harde schijf SEAGATE ST3450856SS SCSI Disk Device
Harde schijf SEAGATE ST3450856SS SCSI Disk Device
Optische Station HL-DT-ST BD-RE BH16NS40
Optische Station hp DVD-RAM GHA3N
SMART Status harde schijf Onbekend
Partities
C: (NTFS) 243668 MB (150173 MB vrij)
D: (NTFS) 122101 MB (65332 MB vrij)
E: (NTFS) 429244 MB (322019 MB vrij)
F: (NTFS) 429244 MB (243491 MB vrij)
Geheugencapaciteit 1195.6 GB (762.7 GB vrij)
Invoerapparaten
Toetsenbord Logitech HID-Compliant Keyboard
Toetsenbord Standaard-PS/2-toetsenbord
Muis HID-compliant Mouse
Muis Microsoft PS/2-muis
Netwerk
Netwerkkaart Intel(R) 82574L Gigabit-netwerkverbinding (192.168.178.37)
Netwerkkaart Intel(R) 82579LM Gigabit Network Connection
Peripherieapparaten
Printer Adobe PDF
Printer EPSON XP-950 Series
Printer HP 4730 PCL 6
Printer Microsoft XPS Document Writer
USB1 apparaat Texas Instruments USB 3.0 eXtensible Host Controller - 0096 (Microsoft)
USB2 apparaat Intel(R) C600/X79 series chipset USB2 Enhanced Host Controller #1 - 1D26
USB2 apparaat Intel(R) C600/X79 series chipset USB2 Enhanced Host Controller #2 - 1D2D
Van: station_two
Verzonden: maandag 13 april 2015 21:58
Aan: johan van der klaauw
Onderwerp: After several time installed CS6 and a clean Windows 8.1 bridge still pause after selecting a picture or right click with button mouse.
After several time installed CS6 and a clean Windows 8.1 bridge still pause after selecting a picture or right click with button mouse.
created by station_two <https://forums.adobe.com/people/station_two> in Bridge General Discussion - View the full discussion <https://forums.adobe.com/message/7434796#7434796> -
How do I open a another applet on click of button in one applet?
If you try to start it on web, if you use showdocument() to
open another webpage which include another applet.
or if from local, you could try Runtime.getRuntime().exec() to
start another java programme by java. -
Firefox keeps opening multiple windows when web link to iTunes clicked.
Running Windows 7, 64 bit. Clicked the "View in iTunes" button on this page, https://itunes.apple.com/gb/app/smartscan-express-fastest/id533516060?mt=8
Link did not open and instead Firefox kept opening another window continuously until there were dozens of windows opening one on top of the other. The only way to stop this was to Shut Down the PC. This has happened on several occasions and it's always when a link to iTunes is concerned.Sorry, this can happen when Firefox asks how you want to open something that Firefox doesn't know how to open, but you tell Firefox to go ahead and open it. This article describes the various ways to resolve it: [[Firefox repeatedly opens empty tabs or windows after you click on a link]].
-
Why does firefox opens new window/tab when i click on a link
if I click any link in Firefox it will open another blank window in addition to the link clicked, blank window opens on top. how do I stop this
If a website codes its links to open in a new window, you can divert that to a new tab.
The basic setting for this is here:
"3-bar" menu button (or Tools menu) > Options > Tabs
The first checkbox: "Open new windows in a new tab instead"
In some cases, a website uses a script to launch a new window with special features, such as a set height/width, or with one or more toolbars removed. To avoid breaking sites that create dialog boxes this way, Firefox does not normally divert this kind of window to a new tab. However, if you wanted to send these to a tab as well, there is a hidden setting you can change. (See: https://support.mozilla.org/questions/1035103#answer-662627])
If Firefox is sending ALL links to new windows or new tabs, you might have an extension like Tab Mix Plus or Tab Utilities which changes the built-in tab handling features. You would need to explore their settings to get it just the way you want it.
Maybe you are looking for
-
Weird Playback Issue...
I have this weird playback issue with iTunes for Windows. I am using Vista and I think the cause of the problem is that I am using MacDrive to access my OS X partition. But anyways, on with the problem. So the problem is that when I play a song, the
-
Hi, I've spotted that in the grub menu.list, the / partition is mounted ro. Whereas with other distribs (like openSUSE) it isn't. And if with openSUSE you try to add ro, it fails to start properly. What happens if I start Arch without ro in the grub
-
Agent Determination Rule using Function Module
Hi all, I am trying to create a custom agent determination rule using function module. But my rule is not getting invoked when the workflow is executed. I created a custom rule and linked my function module (with proper signature). FUNCTION 'ZRULEXXX
-
Can someone help me decode this error message.
Error: 500 Location: /MonteCarlo/jsp/monte.jsp Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at jsp._0002fjsp_0002fmonte_0002ejspmonte_jsp_1
-
Will my connection automatically switch to Infinit...
Hi, I'm a BT Broadband Option 3 customer and have a BT Infinity rollout date in my area of 31st December 2011. I am wondering if on this date my connection will automatically switch to Infinity or do I need to upgrade or similar? Thanks, Steve