Image in a JTextField.Similar to Bookmark icon in a URL field in browser

I am trying to put an image in a JTextField, Similar to BookMark icon in a browser URL entry textField. When User clicks on it,it should be bookmarked. Please suggest me some help on it.
Edited by: 854292 on Apr 23, 2011 8:38 AM

854292 wrote:
I am trying to put an image in a JTextField, Similar to BookMark icon in a browser URL entry textField. ..Why not go one better and put the <tt>Subscribe</tt>/<tt>Bookmark</tt> buttons beside the URL text field so that they are keyboard focusable?
<h3>E.G. BookMarkField.java</h3>
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
class BookMarkField {
    public static void main(String[] args) {
        Runnable r = new Runnable() {
            public void run() {
                JPanel addressComponent = new JPanel(new BorderLayout(4,4));
                addressComponent.setBackground(Color.white);
                addressComponent.setBorder(new TitledBorder("Address"));
                JTextField address = new JTextField("http://pscode.org/", 20);
                addressComponent.add(address);
                JPanel buttons = new JPanel(new GridLayout(0,2,3,3));
                JButton subscribe = new JButton("S");
                subscribe.setToolTipText("Subscribe to this page.");
                buttons.add(subscribe);
                JButton bookmark = new JButton("B");
                bookmark.setToolTipText("Bookmark this page.");
                buttons.add(bookmark);
                addressComponent.add(buttons, BorderLayout.EAST);
                JOptionPane.showMessageDialog(null, addressComponent);
        SwingUtilities.invokeLater(r);
}Of course, use icons in place of the <tt>S</tt> & <tt>B</tt> button texts! (Batteries sold separately.)

Similar Messages

  • Why is icon in the url field indicating RSS availability no longer showing?

    Why is the RSS Icon indicating RSS availability no longer showing besides Firefox's URL field when I know the feature should be available on the website? It shows up in Seamonkey for the same site. I'd like to subscribe in Firefox, but can't.

    The RSS icon was moved to its own toolbar button. You can add it to a toolbar by dragging it from the ''[[how-do-i-customize-toolbars|Customize palette]]'' ( Firefox Button -> Options -> Toolbar Layout ''or'' View -> Toolbars -> Customize ).
    The Bookmarks menu also displays a ''Subscribe to this page...'' item if the page has a feed.
    If you still prefer the RSS icon to appear in the url bar, there is an add-on to do just that: https://addons.mozilla.org/en-US/firefox/addon/rss-icon-in-awesombar/

  • When I adjust an image I used to have a little icon on the bottom right of the image in the browser viewer indicating that the image had been adjusted. These icons are gone. How can i get them back?

    When I adjust an image I used to have a little icon on the bottom right in browser view indicating that the image was adjusted. These icons are gone now. How do I get them back?

    https://discussions.apple.com/message/15285822#15285822

  • Substitute an Icon in URL field

    How can I change an
    http://alt-web.com/favicons.shtml
    selected icon into
    another favicon?
    I think I have to use the a analogous commandline as
    "image/vnd.microsoft.icon".
    Does somebody know the analogous "favicon-term"?
    Thanks for efforts just yet.
    Ciao, servus und salut
    Janis

    Hi Murray,
    here a better explanation for my request:
    First step: I used the
    http://www.html-kit.com/favicon/
    to change the
    IE-icon to a icon stored in my "Source (Image)".
    Second step: I don't like it and now I would like to change
    it into another
    icon, created the same way. But always remains the first
    choosen icon.
    My reflections: I changed the icon in this way: <link
    rel="shortcut icon"
    href="favicon.ico" type="image/vnd.microsoft.icon">. Now
    there is no further
    "vnd.microsoft.icon" in my URL field, that I could replace,
    only the new
    one. And cause of that is my question, could I modify the
    line - for
    instance - in this way: <link rel="shortcut icon"
    href="favicon.ico"
    type="image/vnd.favicon.icon">. (I tried it already but I
    failed).
    Ciao, servus und salut
    Janis
    "Murray *ACE*" <[email protected]>
    schrieb im Newsbeitrag
    news:fsqe64$hs4$[email protected]..
    >I don't undertand your question.
    >
    > Are you asking how to make your own favicon?
    >
    > Read
    http://www.favicon.com
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > ==================
    >
    >
    > "Janis" <[email protected]> wrote
    in message
    > news:fsq6on$bck$03$[email protected]..
    >> How can I change an
    http://alt-web.com/favicons.shtml
    selected icon into
    >> another favicon?
    >> I think I have to use the a analogous commandline as
    >> "image/vnd.microsoft.icon".
    >> Does somebody know the analogous "favicon-term"?
    >> Thanks for efforts just yet.
    >>
    >> --
    >> Ciao, servus und salut
    >> Janis
    >>
    >

  • Since Firefox updated yesterday, it won't respond to addresses in the url field or search terms in the search engine field. I can only go to addresses already in my bookmarks.

    When I type an address into the url field the browser will not load the page...it just sits there as though waiting for me to press enter. Also it won't respond to the recently used addresses that show in the dropdown menu. It will also not respond when I try to use the search engine field (google). This started yesterday after Firefox automatically updated to version 3.5.9. I don't get an error message, just no response at all.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    This can also be a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • My bookmark icons can be fully seen in bookmark toolbar. But on the address bar and on tab most of the icons are blank and when I open most of the websites, their icons are also blank, too. I've already reinstall the firefox 3.6.3 but it is the same. Plea

    My bookmark icons can be fully seen in bookmark toolbar. But on the address bar and on tab most of the icons are blank and when I open most of the websites, their icons are also blank, too. I've already reinstall the firefox 3.6.3 but it is the same. Please help me. Some of the websites show thier icon normally.
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3

    Yes, it doesn't work. I ran in safe mode. nothing changed. I uninstalled Mozilla firefox with only standard removal, no change. I finally uninstalled Mozilla with complete removal and reinstalled it, then it return to normal. Why does this happen? Thanks for your reply.

  • We have a new iPad Mini.  I cannot save a new Bookmark.  In Safari, I go to "Share" and select "Add a Bookmark" yet when I click on the Bookmarks icon, my saved Bookmark is not there.  Am I doing something wrong?

    We have a new iPad Mini, and I'm having inconsistent results using Bookmarks in the Safari icon.
    For a long time, on the iPad, I could only see five items under the Bookmark icons and the Bookmarks Bar was empty. 
    Occasionally, in Safari, the iPad would pick up and display all of the Bookmarks from the Safari browser on my iMac. 
    Other times, there are only a bare few Bookmarks available on the iPad, the Bookmarks Bar goes away and I cannot save a new Bookmark.  It looks like I can save one, but I cannot find it after allegedly saving. 
    Then, all of the Bookmarks will come back and I can save a new Bookmark again. We can't figure out why all of the Bookmarks will show and then they won't.
    I want to think this involves iCloud some way, but for right now, I'm stumped.  Perhaps we're just too inexperienced and haven't come around the learning curve yet.
    Thanks for any help.
    Steve

    No, I see the three areas at the bottom of the Bookmark area that you refer to, but that also highlights an issue.  When I want to save a story to my Reading List and click on Share then "Add to Reading List" then go back to look at what is stored in the Reading List, my recently-saved item is not there.
    I looked thru the History tab and the Reading List tab and have been in the Bookmark tab.  But even when I Save a Bookmark, that newly-saved Bookmark does not show up in the Bookmark area.
    But then again, the next day (and actually just in the last half-hour) all of the functionality came back.  When I look at the Bookmarks, suddenly, again, all of the Bookmarks that are on my Safari browser on my iMac are now there, and I can now Save a Bookmark.
    It keeps coming in and out and that is what is driving me a little nuts.
    Thanks.

  • My UI is not the same as that shown in the Mozilla website..why? (i.e home button still on left hand side of screen and no bookmark icon)

    I was using FF 4 Beta and applied the update ... I noticed that my final version was not the same as shown on the website so I removed the beta setup file and took off all versions of FF cleaned adn restarted my laptop and then reinstalled a clean version of FF 4.. however my final* version is not the same as shown still. Is this right or do I need to do something else :(
    Examples of what is different is the home icon remains on the left hand side of the screen next to the back button and I do not have the bookmarks icons which from the website should appear on the right hand side next to the new location of the home button.

    Look you can customize it very easily.
    Press Alt+V to have the View Menu -> Select Toolbars -> Click on Customize -> Now drag the Home Button to anywhere on the toolbar and pick the Bookmarks Button from the available icons and put it in the toolbar.

  • How can I delete the repeated bookmarks icons in the bookmarks toolbar?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/879742]]</blockquote>
    My Firefox 6.02 bookmarks toolbar shows the same two bookmarks repeatedly (3 times and two times) so there is no space for the favourite bookmarks I had originally. How can I delete the repeated bookmarks icons in the toolbar? I tried to drag them to trash, but without success. I could not do it from view/ toolbars/customize either.

    This is a duplicate, please see my suggested answer <br/>[/questions/879742#answer-251913] <-- clickable link --

  • I get a black screen instead of my bookmark list when I click on bookmarks icon

    BookThis happened suddenly.  I can still access my bookmarks by going to the Bookmarks(top of screen)/Bookmarks Bar/then pull-down Alice's Bookmarks from that to access my bookmarks. However, I have to keep the cursor pushed down, cannot rearrange them from there or view the actual URLs.  What did I do to cause this?!  More importantly, how do I UNDO it and get back my access to the nice bookmarks list by simply clicking on the bookmark icon up top?"  It is VERY frustrating!

    this is happening to me as well but I want to see what that bookmark is as aposed to having to double click the bookmark itself I have saved many bookmarks and I am regualrly looking for things on the bookmarks so I do not want to have to click evey single bookmark to find things again

  • My favorites bookmark icon has disappeared. It was next to my home page icon and is now gone. How do I get it and my bookmarks back

    My bookmarks icon, which was located next to the homepage icon is missing. Please tell me how to restore the icon so I can have access to the bookmarks

    Hi,
    Please try this: '''View '''('''Alt '''+ '''V''') > '''Toolbars''' > '''Customize''' or right-click the '''+''' after the last tab, look for the '''Bookmarks''' icon (there may be two), click, hold, drag and drop it on an empty space in the toolbar. When the '''Customize...''' window is open you can also check if the icon is hidden below other icons by moving the other toolbar items.
    [https://support.mozilla.org/en-US/kb/how-do-i-customize-toolbars Customize Toolbars]
    Useful links:
    [https://support.mozilla.com/en-US/kb/Options%20window All about Tools > Options]
    [http://kb.mozillazine.org/About:config Going beyond Tools > Options - about:config]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]
    [https://support.mozilla.com/en-US/kb/Page%20Info%20window Page Info] Tools (Alt + T) > Page Info, Right-click > View Page Info
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]
    [https://support.mozilla.com/en-US/kb/Viewing%20video%20in%20Firefox%20without%20a%20plugin Viewing Video without Plugins]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]
    [https://developer.mozilla.org/en/Command_Line_Options#Browser Firefox Commands]
    [https://support.mozilla.com/en-US/kb/Basic%20Troubleshooting Basic Troubleshooting]
    [https://support.mozilla.com/en-US/kb/common-questions-after-upgrading-firefox-36 After Upgrading]
    [https://support.mozilla.com/en-US/kb/Safe%20Mode Safe Mode]
    [http://kb.mozillazine.org/Problematic_extensions Problematic Extensions]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes Troubleshooting Extensions and Themes]
    [https://support.mozilla.com/en-US/kb/Troubleshooting%20plugins Troubleshooting Plugins]
    [http://kb.mozillazine.org/Testing_plugins Testing Plugins]

  • After updating to Firefox 5 on a Windows 7 PC the bookmarks icon won't stay on the toolbar and I can't click it to get a bookmarks column on the left side of the screen, how do I fix it?

    There was no bookmarks icon on the toolbar. I used View > Toolbars> customise to put various icons on the toolbar all of which were visible using "customise". On going back to Firefox all the other icons remained visible but the Bookmarks Icon disappeared leaving no means of getting a bookmarks column on the left of the screen when using Firefox.

    Check that you still have the "Bookmarks Toolbar items" placed on the Bookmarks Toolbar<br />
    If the menu bar is hidden then press F10 or hold down the Alt key, that should make the "Menu Bar" appear
    Make sure that toolbars like the "Navigation Toolbar" and the "Bookmarks Toolbar" are visible: "View > Toolbars"
    * Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout" and check that the "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    * If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette in the customize window to the Bookmarks Toolbar
    * If you do not see the "Bookmarks Toolbar items" or other items that are missing in the toolbar palette or on a toolbar then click the "Restore Default Set" button
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • How do I move the Bookmark icon to the left side of the screen in Firefox 8.0?

    I am left handed and after all this time I've lost both the bookmarks icon and the homepage icon to the far right of the screen. Why did you do that, to look like Windows Explorer? If I wanted IE8.0 I would have been using it. And the default search engine is Bing? At least there is a work around to change that. You have really made a mess of this outstanding product.

    See directions in
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/how-do-i-customize-toolbars

  • Hi, i have an iphone 3g and it won't reset, in the screen i have an image of the plug and the itunes icon, what can i do?, hi, i have an iphone 3g and it won't reset, in the screen i have an image of the plug and the itunes icon, what can i do?

    my iphone 3g won't reset, and doesnt do anything, it has on the screen an image of a plug and the itunes icon, i need help

    To restore your iPhone, connect it to iTunes and hold down the Power/Sleep button simultaneously with the Home button. Keep both buttons pressed down until your iPhone powers off. When your iPhone turns off, release the Power/Sleep button, but keep the Home button depressed until iTunes detects the iPhone (it should detect restore mode).
    Once iTunes detects your iPhone in restore mode, hit the “Restore” button to get your crashed out iPhone back to working order.

  • No longer able to clear Bookmark Icons

    ...using Cocktail or Onyx. Is this new to 3.0.4?
    Anyone else notice this?

    Cocktail does this...
    Have you tried it (Cocktail 3.8.3) with Safari 3.0.4 in Tiger? The Bookmark icons are still there even after running Cocktail with "clear: Page Icons" checked.
    Same with Onyx (1.8.3) and checking "Bookmark Icons" under "Delete" under the Internet tab in the Cleaning pane...
    The icons remain -- unless it's just me --
    I'll try Tinker Tool next.
    Thanks,
    Geoff

Maybe you are looking for

  • IDOC to JDBC scenario in case of Cost Element Group IDOC.

    This is an IDOC to JDBC scenario. The Cost Element Group IDOC is having different segments. The main segment E1COGH (1...unbound) is consisting of different subsegment like E1OGS (0...unbound) & E1COGV (0...unbound). The main segment (E1COGH) along w

  • I was able to open a pdf document but was unable to save to my computer.  I have adobe acrobat pro x

    I was able to open a pdf document but was unable to save to my computer.  I have adobe acrobat pro xi.  the message i received was.  "the document could not be saved.  there was a problem reading the document (8)." I was able to convert it to a Word

  • Websites not displayed correctly

    Hi, since i updated to Safari 6.0.2, many websites are not displayed correctly anymore. instead of pictures i see a blue question mark, sometimes the whoe layout is a mess. this concerns multiple websites, alse like facebook or youtube. when i refres

  • Macbook Retina Displays

    I just stopped by the University Village Apple Store to get my screen replaced. Third time in a year that I have had to replace hardware-first time to replace all the dots on my screen, second time to replace a chord that was burnt all the way throug

  • I need a menu!!+other stuff

    You see, I'm realy, realy new (like 2 months) and I need some standerd edition java ONLY sorce code for this: ( "..." means a color/font choser) ( " ||===||[then the contents] " means a toolbar-movable) |File| |Edit| |Tools| |Help| ==================