Removing PopUp from JList
Hi!
I have a small problem with popup menus in a JList. When I right click on an entry in the JList, the menu is shown. However, there is possible to change the selected entry in the list with the arrowkeys and the popup menu does not dissapear then. How can I do so that the popup is hidden when I change selected value?
Thanks in advance,
// Andreas
EditLurk.java [70:1] Class Javax.swing.JList not found in type declaration or import.
adminList = new Javax.swing.JList(adminModel);
^
EditLurk.java [70:1] No constructor in JList matches <init>(DefaultListModel)
adminList = new Javax.swing.JList(adminModel);
^
Similar Messages
-
Does PopUpManager "close" event remove PopUp from memory?
I'm using a lot of popup windows (in addition to tooltips) in an application. Does the PopUpManager's close event remove the popup from memory? If not, I'd like to find out how this could be done.
Thanks.on close, you need to call PopupManager.removePopup(this) here this is the popup. and make sure that this popup does not have any strong references/event handlers listening to custom events /events
-
Remove Selection from jList ??
Hi,
How do I remove a Selection from a jList??
The items in the jList are Vectors
I now use jList.clearSelection() but the selection stays there..
Thanks,
MarieFunny you should ask. I just now decided to try out what I suggested because I've never actually used a Vector in a JList. In my simple example below, I actually have to call repaint on the list to get it to refresh. I should NOT have to do that. Might be a bug in the VM?Please try it out on your machine and see if you can remove the 'repaint' statement in my action listener and get the list to refresh.
I use 1.4.1_02 JDK. Let me know also which JDK you're using. Thanks!
import javax.swing.*;
import java.awt.event.*;
import java.awt.BorderLayout;
import java.util.Vector;
public class MyList extends JFrame {
Vector model = new Vector();
public MyList() {
super();
setSize(300,400);
getContentPane().setLayout(new BorderLayout());
buildModel();
final JList list = new JList(model);
getContentPane().add(list, BorderLayout.CENTER);
JButton btn = new JButton("remove");
btn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
model.remove(list.getSelectedIndex());
list.repaint(); //why should I have to force a repaint???
getContentPane().add(btn, BorderLayout.NORTH);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
show();
private void buildModel() {
model.add("one");
model.add("two");
model.add("three");
public static void main(String[] args) {
new MyList(); -
JList run time errors when removing items from list
Hi there
I am having trouble removing items from a JList. For a While it was working fine and now it outputs runtime errors everytime samething gets removed from the lsit
Here is the code
//declare
public class Consumertab1gui extends JPanel implements ActionListener
public static JList conList = null;
private static DefaultListModel model = null;
// Create a list with some items
model = new DefaultListModel();
conList = new JList(model);
//set the size of cells in the list with the length of the string
conList.setPrototypeCellValue("Lenght 1234567890");
conList.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
conList.addListSelectionListener(new ValueReporter());
//set a scroll onto the list
JScrollPane conScroll = new JScrollPane(conList);
add(conScroll,c);
//when the button gets pressed to drop the selected item the following code is called
private void dropConsumer()
int selItem=0;
componentsV.comVRemove(conList.getSelectedValue().toString());
selItem=conList.getSelectedIndex();
System.out.println("No:"+(model.getSize()-1));
System.out.println("S:"+selItem);
remConList(selItem);
dropCon.setEnabled(false);
//which in turns calls this
public void remConList(int pos)
model.remove(pos);
when the model.remove(pos) code is executed the following runtime errors are given:
java.lang.NullPointerException
at Consumertab1gui$ValueReporter.valueChanged(Consumertab1gui.java:197)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1321)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1335)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)
at javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:546)
at javax.swing.plaf.basic.BasicListUI$ListDataHandler.intervalRemoved(BasicListUI.java:1561)
at javax.swing.AbstractListModel.fireIntervalRemoved(AbstractListModel.java:160)
at javax.swing.DefaultListModel.remove(DefaultListModel.java:478)
at Consumertab1gui.remConList(Consumertab1gui.java:38)
at Consumertab1gui.dropConsumer(Consumertab1gui.java:58)
at Consumertab1gui.actionPerformed(Consumertab1gui.java:46)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
can anyone spot any mistakes in the code or suggest possible resons as to why these run time errors occur?
Thanks
alexisjava.lang.NullPointerException
at Consumertab1gui$ValueReporter.valueChanged(Consumertab1gui.java:197)The NullPointerException occurs at line 197, in the valueChanged method of your ValueReporter inner class. I have looked through your post several times but I don't see where you posted that method. Anyway, that is where you should look.
PC² -
Error while opening a popup from managed bean
Hi,
I am trying to open a popup from bean, after another popup is closed. When I open the second popup either through ActionListener(on first popup button) or DialogListener(on first popup), I am getting the below error on browser status bar(!); and the second popup doesn't open. There is no error in the log.
*'AdfPage.PAGE.findComponent(...)' is null or not an object.*
Although the popup id is there on the jspx page.
<af:popup id="confirmationStatus" binding="#{MyBean1.confirmationStatus}">
<af:dialog cancelVisible="false"
closeIconVisible="false" binding="#{MyBean1.d2}"
title="Appointment Confirmation Status">
<af:outputText value="Appointment is successfully confirmed"/>
</af:dialog>
</af:popup>
public void confirmAppointment_dialogListener(DialogEvent dialogEvent) {
FacesContext context = FacesContext.getCurrentInstance();
ExtendedRenderKitService service = Service.getRenderKitService(context, ExtendedRenderKitService.class);
String popupId = "confirmationStatus";
service.addScript(context,"AdfPage.PAGE.findComponent('" + popupId + "').show();");
Please tell me why my popup is not getting open from the managed bean and I am getting an error in below line.
service.addScript(context,"AdfPage.PAGE.findComponent('" + popupId + "').show();");To find out the right address of a component related to an other component, open your page select the component you want to add a partial trigger, go to the partial trigger property, select the down arrow at the right end and select 'Edit'. Now look for the popup in the component tree shown on the left side. When you have found the popup shuffle it the the selected side and click OK. The string you see in the field is the full address of the popup related to he component you've selected. Try the string you see there in your bean code. Remove the string from the partial trigger property, it's just to get the correct path.
One other thing to check is that your popup has the ClientComponent property set to true.
Next thing to try, is to use AdfPage.PAGE.findComponentByAbsoluteId(...)
Timo -
I recently bought a new IPAD2. All personal data and APPS were transferred from my older IPAD to my new one at the time of purchase. I'd like to give my older IPAD to my husband w/o removing him from my Apple acct. Apple's support does not provide instructions for my situation. Does anyone have suggestions as to what steps I should take?
What you might need to do depends upon how you want the old iPad to be for him.
If he will be using your iTunes account for any purchases/downloads from the store then he can continue to be logged in with your account in Settings > iTunes & App Stores. If not then log out of your account by tapping on your id in there, and he can then log in with his own account - any apps and other store downloads that you leave on the iPad will remain tied to your account, so only your account will potentially be able to redownload them and/or download updates to your apps.
To use his own account for Messages he can log out of your account via Settings > Messages > Send & Receive - tap on your id at the top of that screen and select 'sign out' on the popup. He can then log in with his account. Similarly for FaceTime : Settings > FaceTime (tap on your id on that screen). And (if he wants to back up his content to his own account) : Settings > iCloud > Sign Out
If you want to remove all content from the old iPad so that he can start afresh with it, then Settings > iCloud > Sign Out, and then Settings > General > Reset > Erase All Content & Settings -
How do I remove MacVx from my macbook pro
how do I remove MacVx from my computer, as of yesterday I am getting ads and pop ups. Please help
The Safe Mac » Adware Removal Guide
Helpful Links Regarding Malware Protection
An excellent link to read is Tom Reed's Mac Malware Guide.
Also, visit The XLab FAQs and read Detecting and avoiding malware and spyware.
See these Apple articles:
Mac OS X Snow Leopard and malware detection
OS X Lion- Protect your Mac from malware
OS X Mountain Lion- Protect your Mac from malware
OS X Mavericks- Protect your Mac from malware
About file quarantine in OS X
If you require anti-virus protection Thomas Reed recommends using ClamXAV. (Thank you to Thomas Reed for this recommendation.)
From user Joe Bailey comes this equally useful advice:
The facts are:
1. There is no anti-malware software that can detect 100% of the malware out there.
2. There is no anti-malware that can detect anything targeting the Mac because there
is no Mac malware in the wild, and therefore, no "signatures" to detect.
3. The very best way to prevent the most attacks is for you as the user to be aware that
the most successful malware attacks rely on very sophisticated social engineering
techniques preying on human avarice, ****, and fear.
4. Internet popups saying the FBI, NSA, Microsoft, your ISP has detected malware on
your computer is intended to entice you to install their malware thinking it is a
protection against malware.
5. Some of the anti-malware products on the market are worse than the malware
from which they purport to protect you.
6. Be cautious where you go on the internet.
7. Only download anything from sites you know are safe.
8. Avoid links you receive in email, always be suspicious even if you get something
you think is from a friend, but you were not expecting.
9. If there is any question in your mind, then assume it is malware. -
Problem removing components from JLayeredPane
Hi all,
I have a problem showing and hiding components on a JLayeredPane. It goes Something like this:
In my application I have a button. When this button is pressed I use getLayeredPane to get the frames layered pane. I then add a JPanel containing a number of labels and buttons onto that layered pane on the Popup layer. The panel displays and funcitons correctly.
The problem comes when I try to remove the panel from the layered pane. The panel does not dissappear and I am no longer able to click on anything else in the frame!
If anyone has any ideas how to get around this or what the problem might be I'd be very greatful to hear it. Sample code follows:
* Called when the button on the frame is pressed:
* @param e
public void actionPerformed(ActionEvent e)
JLayeredPane mLayredPane = getLayeredPane();
int x = 0, y = 0;
Container c = this;
while (true)
c = c.getParent();
if (c != null)
x += c.getLocation().x;
y += c.getLocation().y;
if (c instanceof JRootPane)
break;
else
break;
mPanel.setBounds(x, y, 235, 200);
mLayredPane.add(mPanel, JLayeredPane.POPUP_LAYER);
//And when a listener fires from the panel I use
mLayredPane.remove(mPanel);
//To remove it from the layered pane and in theory return the
//app to the state it was before the panel was displayedThanks again...The problem is you only removed it within the program, without actually removing it from the display. If that makes any sense, or whether thats your problem at all.
If you are only using this line.
mLayredPane.remove(mPanel);
I think if you tell it to repaint and revalidate it should work, though i have never used LayeredPane.
mLayredPane.repaint();
mLayredPane.revalidate(); -
I have accidently removed outlook from the dock. How can undo ?
Hello! i have accidently removed outlook from my dock. I can retrieve outlook?
if you open the outlook application, it will come back onto the dock
then hold the control key down while clicking on it's icon and you will get a small popup
under the options is the choice to "keep in dock" this will make it stay put! -
Strange message when removing subtypes from IT1002 for OM
Hi,
We need to remove some of the subtypes for IT1002 that show up in OM. Or rather - we need to differentiate subtype by object type (as is done by SAP).
The only way I have found how, is to remove the subtypes from T777Z under the time constraint view for IT1002.
However, when I try to delete a row, I get the message: "Documentation was deleted. Continue?".
This message worries me a little. So my questions are:
1. Is this the correct method for removing subtypes from different object types in OM?
2. What does the popup message mean, and do I need to worry about it?
Any suggestion appreciated
Best regards
KirstenHi,
The correct way is through transaction OOSU or IMG path: SPRO>Personnel Management>Organizational Management>Basic Settings>Data Model Enhancement>Infotype Maintenance>Maintain Subtypes
If you try deleting from here, you will not get that confirmation box. Iu2019m not sure what it means but looks like itu2019s trying to delete the object itself. Youu2019ll see u201Cdelete an objectu201D in the title bar of that box.
Hope this helps.
Donnie -
iMac OS 10.5.8, 2.66 GHz, 4gb memory. I've tried with adblock on and off. I use HTTPS Everywhere.
Netflix suggested it might be a browser issue and to try Safari. I was able to remove items from queue using Safari.Addendum: The .jpg file, below, shows the netflix popup I get when trying to delete a video.
-
How do I remove mackeeper from my MBA (Yosemite)
I've seen MacKeeper many times in the past and to my knowledge, have NEVER installed or run the program. Somehow it's wormed my way on to my MBA to the point where the computer is almost unusable. Both in Safari and Chrome (which I almost never use), when I open any link, another tab appears with some MacKeeper BS or some other random webpage opens. I've removed MacKeeper from my Applications folder to no avail.
So much for Apple computers being immune to virus garbage. Is there some simple application that I can download that will purge my entire MBA of this problem. I did see a checklist that involved many steps that I didn't understand. I'm a bit worried that this MacKeeper may be recording my keystrokes and noting my login information to financial websites. I'm prepared to do a complete reinstallation of Yosemite if this will make this problem go away. Even that might not do the trick if there is some reference to this problem in the Cloud and just waiting for a future sync with a new copy of Yosemite.
Hope someone can help me in this matter. If I don't have to worry about the cloud, I'm prepared to trot down to my local Genius Bar and have them do a reinstallation of Yosemite. If do get it off my computer, is there anyway to prevent it in the future. To the best of my memory, this problem only happened after the installation of Yosemite.Looks like I jumped the gun. However, my MBA is probably 85-90% better. I did run ClamXav on the SSD and did get some errors that I deleted. I then reformatted my external Time Machine and then did a full TM backup. I just completed a ClamXav on the TM and got the following errors from the supposedly clean SSD that I backed up shortly before.
Filename Infection Name Status
Application.app Osx.Adware.Geonei-9
Reset Search.app OSX.Adware.Omnibar
VSearchAgent.app Osx.Trojan.VSearchAgent
VSearchLoader.bundle Osx.Trojan.VSearchAgent
VSearchPlugIn.bundle Osx.Trojan.VSearchPlugin
Actually ClamXav found 15 errors, all the same as the list above, but in different places on the TM. This list repeated 3 times. I can't delete these errors on the TM like I could from the internal SSD. The previous errors which I didn't write down included some plishing errors.
Still, my MBA is running like a top. I'm going to keep my Apple Genius appointment this afternoon to see what they have to say about this. I'm now starting to think the only way out from these errors is to total wipe my SSD and the TM. Then start all over with a fresh copy of Yosemite and a new copy to my TM. At this moment, the only problem is intermittent popup ads in new tabs. Annoying.
The reason my last TM backup was in June is another story. That backup was with Yosemite beta. I was one of the early beta Yosemite testers and the beta ran great until one day when I did a beta update, it totally screwed the system. Computer wouldn't even boot. Went to see the Apple Genius and all they could do since it was beta was to reinstall Mavericks. For some reason, I couldn't use the TM with Yosemite beta and then Mavericks on the same TM disk. I had to reinstall everything (Word, Excel, etc, etc). I did have a few strange things going on with Mavericks the last 2 months, but nothing I could put a handle on. I did install the regular Yosemite the first day it came out, but I've never felt it ran as good as the beta version. So, this might have something to do with the present problem.
It will be interesting to see what the Genius says tonight. I was trying to wrap this up before we leave so that a good MBA will be waiting for me on return. I'm going on the cruise with only my iPad and iPhone. -
How does one keep the Creative Cloud purchase/signup popup from popping up every time I flash up Dream Weaver CS6?
Johnnyontherocks it is likely you installed an updated version of the Adobe Application Manager. Remove all copies of Adobe Creative software from the computer and reinstall to downgrade the installation.
-
MacDefender is a scam; Tip on how to remove it from your iMac
I, like many other victims, experienced an annoying popup from MacDefender right after I did an image search via Google. As a result, I spent several hours in search of solutions to remove this annoying SW. Anyway, I am not a technical person and just bought my iMac 3 months ago and am still learning how to get used to all the operational menus. Luckily, thanks to one Mac user who posted this solution on the internet, I followed his instructions and was able to get rid of this stupid SW. :-)
I'd like to share this in case another victim comes along ....
Launch Finder and search for the app name (in this case - MacDefender)
Search for the whole Mac
Search for File name (by using the drop down menu on the left box)
Use the button below the search box to add search criteria. This will allow you to have more drop down boxes
Once you have more search criteria options, select the "Other" on the left box and the " System file" on the right box. Use the drop down menu on each box
There is a default option "aren't included"; click on this box and change it to "include"
Sort by name, kind, date, ect., to identify components of this particular app, such as folders, .plist files, cache files...ect.
Delete all the files and folders related to this app.
Do not empty the trash until you check and make sure that everything (all good apps) are working normally. Incase you need to restore some files that you accidentally deleted. One way to make sure is the file has the same date that this MacDefender was downloaded.
Reboot the iMac.
After I followed these steps, I was able to completely remove the MacDefender. I hope you will be able to do the same.
Good luck. :-)SIMPLY READ THE ARTICLE FROM INTEGO SECURITY.
http://blog.intego.com/2011/05/02/intego-security-memo-macdefender-fake-antiviru s/ (2011 Mac Trojan makes news)
This is a simple login app that can be easily removed. If you hadn't typed your admin password to allow it to install, you wouldn't have this thing. Not trying to lay blame, just want to allay fears that this thing installs itself. It does not. -
How can I remove offers4us from my mac on chrome?
Hallo, I need help. I am trying to remove Offers4us from my mac, on Chrome. I receive plenty of annoying popup with offers. Can somebody help? Thanks
gabriellaThank you very much, unfortunately the instructions are not so clear for me, I am trying to figure out what they suggest, but my english is not so good and I cannot understand what ‘Customize and Control Google Chrome’ menu > ‘Options’ > ‘Under the Hood’ > ‘Reset to Defaults’ button means in the italian translation
anyway, I will keep on trying and see what happens.
Maybe you are looking for
-
Generating a random password and sending a userid through mail to the user
HI, I have a field named UserID in the process form,this user id can only be accessed by the GIA PROVISIONING ANALYST for updation of the userid to provision the resource to some related id of the user .I want to send this user ID from the process fo
-
Can u help stop people from taking money from my bank account
money has been taken from my bank account I need it to stop ino that fuckbook .com have ino about that but can you. stop any other from now please
-
i would like to change the background of my spry horizontal menu to an image saved on my computer.. the image is also the layout of my website and i would like it to match. is it possible for me do so this? SOS. hELP.. getting slightly fustrated.
-
Cannot see some registry values in Windows Server 2008 R2
I have a couple of Windows 2008 Server R2 machines running a custom shell with AutoAdminLogon enabled. I'm trying to temporarily disable these settings to apply some patches but when I navigate to HKLM\Software\Microsoft\Windows NT\CurrentVersion\Wi
-
When getting start;it's appeared hard disk error. Please help me to recover my laptop computer. Thanks Kind Regards Lakmali