Best way to small icons anywhere in the screen.

Hello

I am doing for my application kinda like a panel where the user will have a JPG image which will be a map in the background and on top of that I need to have small images or icons that will be nodes of a network and nodes will have attributes that will determine the position of the screen to fit the map below.

Each node must also be able to click on it to open a window that contains the data of this node.

I'm new to Java and I don't know which is the best way to do it in Java. Can someone point me to the right direction?

I thought to use icons or maybe buttons with the image of knot on top. But I don't know if this is the best approach.

Thank you.

Most likely, you'll want to extend JButton or an icon to add the attributes, and then add an action listener so he can open a new window and display these attributes.

class NodeButton extends JButton{
    private Map attributes;
    int xPos;
    int yPos;
    String title;

    public NodeButton(int x, int y, String inTitle, Map inAttributes) {
        title = inTitle;
        xPos = x;
        yPos = y;
        attributes = inAttributes;
    }

}

Can do something like this to create a new node

Map attributes = new HashMap();
//populate your attribute map
NodeButton nodeButton = new NodeButton(100, 200, "My Node", attributes);
nodeButton.addActionListener(new ActionListener() {

               @Override
               public void actionPerformed(ActionEvent arg0) {
                            //display your new JFrame in here
               }
          });

Tags: Java

Similar Questions

  • Which is the best way for a function called identify the class name of the appellant.

    Which is the best way for a function called identify the class name of the appellant.

    (1) sun.reflect.Reflection using the function call
                    Class caller = Reflection.getCallerClass(2);
                    System.out.println("Caller Class Name ::"+caller.getName());
    Trace of function called battery 2) analysis of current threads
                    StackTraceElement[] stElements=Thread.currentThread().getStackTrace();
                    System.out.println("Caller Class Name ::"+stElements[3].getClassName());
    Y at - it all the other ways to achieve the same. What is the best way?
    Called function does accept no argument, I don't want the arguments of function calling function called t.

    Help, please.

    With greetings
    Paul

    798185 wrote:
    Which is the best way for a function called identify the class name of the appellant.

    Y at - it all the other ways to achieve the same.

    SecurityManager

        // 0 is the anonymous SecurityManager class
        // 1 is this class (also works in static context)
        // 2 is calling class
        static Class getClass(int i) {
            return new SecurityManager() {
                protected Class[] getClassContext() {
                    return super.getClassContext();
                }
            }.getClassContext();} 
    
  • My cursor takes the form is no longer the hand icon to slide the screen down to close.

    Is no longer my cursor becomes a hand icon to drag the screen and I am unable to do it now.  Activate master to delete to close the active screen. In addition, there is no way to access the menu on the right to search, close, etc.. A way to solve this problem?

    Hello Mikal,

    I understand the inconvenience caused to you. I will try to help you in the matter of fixing.

    In order to understand the issue more clearly, I would ask that kindly provide me with the following information.

    1. Did you do any hardware and software changes to the system?

    2. Since how long you are having this problem?

    3. Do you receive an error message? If Yes, what is the exact error message?

    It is possible that this problem would have occurred due to corruption in the mouse settings in the system.

    I would suggest trying the following methods and check if it helps.

    Method 1:

    Run the built-in convenience store equipment and devices and check if it works. Follow the steps below.

    Note: If your computer is having problems with a recently installed device or other hardware, try to use the hardware and peripheral troubleshooting tool to solve the problem. It checks the common issues of interest and ensures that a new device or hardware connected to your computer has been installed correctly.

    1. Press Windows key + R, type Panel.

    2. Type of Troubleshooting in the search bar, click Troubleshooting.

    3. Click hardware and sound, click on material and devices.

    4. Follow the steps in the wizard to run the troubleshooter.

    If the problem persists, please follow method 2.

    Method 2:

    Please follow the steps below and check if it helps.

    1. Open the "Start" menu by clicking on the Windows logo in the corner of your screen. Click on "Control Panel."

    2. Click the box in the corner of the window titled "Search Control Panel" and then type "mouse". The window will automatically display search results.

    3. Click on the word "Mouse" in green text to open the "Mouse properties" window

    4. Click on the tab "pointers". Under 'Customize', the window shows your current mouse icons.

    5. Click on 'Select Normal' to highlight and press the button "Browse".

    6. Scroll the list of available cursors and find the files named 'aero_link,' 'aero_link_l' and 'aero_link_xl '. These files contain icons of the hand in three sizes, from the smallest to the largest.

    7. Click on the file of the icon of the desired size. Press the button 'open '. Repeat this process if you want to change all other cursors. For your pointer still resemble a hand, do it for each other cursor on the list 'customize '.

    8. Press the 'Ok' button when you are finished editing all the sliders. The system will immediately change the appearance of the pointer of your.

    For reference:

    Please refer to the procedure described in the article below and check if it helps.

    Search, touch, & mouse

    http://Windows.Microsoft.com/en-us/Windows/search-touch-mouse-help#touch-mouse-search-help=Windows-8&V1H=win8tab4&V3H=winvistatab1

    I hope this information is useful.

    Please let us know if you need more help, we will be happy to help you.

    Thank you.

  • What is the best way to download icons I created on illustrator on a file photoshop of a Web site design?

    I currently trying to design a website on Photoshop. I designed a few icons for the Web site using Illustrator. What is the best way to download these icons on the photoshop file and keep them looking for crisp and high quality? I tried a number of ways, but all seem to come out pixelated.

    What you need to do is to ensure that you create the icons the PPIS and the Photoshop document Illustrator and true to size. If you have created the icons tell with 300ppi, but are in pixels it do not have the same properties that the Web site that you create if that was put in place as 72 dpi and so will distort.

    Once you have mastered that you are better (if you think that there may be changes to the icons later down the line) to create each icon .ai files and place them intt the Photoshop document, and then if you make changes to the source .ai file that it will update in the design of Web sites you.

    If you see no icons change then you can always just copy and paste directly from Illustrator, Photoshop and make changes on the fly, ensuring that keep you it as a smart object.

  • What is the best way to place an alias of the Recycle Bin on my desktop?

    Application of small trivial customization here.  Using OS X 10.11.4, what is the best way to create a trash can on the desktop?  I already tried the Terminal command to place the alias, but I'm unable to change the icon.  Given that I have with this method, how to change the folder icon image so that it represents a trash can?  I would find it useful enough to be honest.

    Thanks in advance.

    You can try to drag /System/Library/CoreServices/CoreTypes/Contents/Resources/TrashIcon.icns into the window read the information for the Alias. Upper left corner.

  • Application Navigation - best way to implement right top of the page "Menu".

    Hello

    I am building a Blackberry application that has the following requirements. I need to create a 'menu' button at the top right of my screen that when clicked opens a list of items which, once clicked would open a screen). When the 'menu' button is clicked again buttons list disappears. A bit like the Blackberry menu but launched by a button attached to the top right of the screen. King of hard to describe, so please let me know if you want more details.

    I was reviewing what components are available and trying to figure out the best approach. I am using a button field list style (http://docs.blackberry.com/ja-jp/developers/deliverables/29251/Creating_a_list_style_button_field_16...).

    Any suggestions on a better way to approach it?

    Thanks in advance!

    Welcome!

    You basically need a button, ListStyleButton is fine, then you need a small screen to display, which will be a PopupScreen.  Get this working, then we can talk about positioning of the PopupScreen.

    The ListStyleButton seems to be an OS 7.0 field, but you will find something very similar here:

    http://supportforums.BlackBerry.com/T5/Java-development/implement-advanced-buttons-fields-and-manage...

    that you use in older levels.

  • What is the best way to cause a VM enter the pending state question?

    I work for a small company that makes a product that allows for the management of Virtual Infrastructure of a SmartPhone (BlackBerry, iPhone, Android etc.) and I want to test our feature that allows you to answer questions VM. But I can't find an easy way to get a virtual machine with a question! Then...

    What is the best way to cause a VM enter a State of "pending issue"? We have vms (200 x, XP) windows and some linux vms.

    Thank you!

    fly to roveit.com

    The easiest way is to copy a virtual machine and it associated the file and when you move it over a data store different and you just update the descriptor entries + VMDK file VMX, one thing people forget to do is also updating uuid.location that refers to the data UUID store. When you try to turn on the virtual machine, you will always have a question asking if you want to

    (1) cancel

    (2) I_moved it

    (3) I_copied it

    Now to replicate this and always get it without copying files is quite simple and takes< 1min.="" create="" a="" dummy="" vm,="" call="" it="" whatever="" and="" you="" don't="" even="" need="" to="" allocate="" much="" space,="" 1gb="" thin="" will="" do.="" you'll="" then="" want="" to="" unregister="" the="" vm,="" right="" click="" and="" remove="" from="" inventory,="" don't="" delete.="" now,="" you'll="" need="" console="" access="" to="" the="" vm's="" .vmx="" file,="" use="" either="" the="" classic="" esx="" service="" console="" or="" unsupported="" busybox="" console.="" if="" you="" have="" access="" to="" neither,="" then="" you="" can="" use="" the="" datastore="" browser="" to="" download="" the="" .vmx="" and="" make="" your="" changes="" and="">

    I'll assume you have console access, go to the data store where the configuration of the virtual machine is stored. Edit the file and look for the entry "uuid.location" and simply change the first two numbers to do anything, say 11 and then save the file. Now return to the store of data browser and re - register your virtual machine, your VM should now appear once again and then try to turn on the virtual computer. If everything was done correctly, you will get a question arises for the virtual machine and it will not until he said.

    You can probably even write a shell script that will copy a backup .vmx file and re-save to automate this process as you write your script/program.

    =========================================================================

    William Lam

    VMware vExpert 2009

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • HP Pavilion Notebook e101sp 17: best way to charge 10 Windows with the laptop HP software (post regularly update 8.1-&gt; 10)

    My HP Pavilion 17 - e101sp Notebook PC (ENERGY STAR) came with preinstalled Windows 8.1. I later upgraded to Windows 10.

    Although I had Norton Internet Security installed since the bootups earlier, I still have some virus infections from time to time (discovered through runnin ClamAV from a Linux Debian partition, I put in place on the same computer) laptop. After the expiration of the 1 year subscription NIS (I had lost confidence in it right here...) I played around with a few other sollutions.

    In the end, I now have a Windows essentially not fixable (infected) 10. It's not scary for me because Linux is my main OS 'at home' for 15 years now. However, being the standard Windows "de facto" is it much, I still would like to have a copy of own work, installed.

    My question is, in the current scenario, as I mentioned, which of the two is the best way to have 10 Windows installed with all the goodies of HP, alongisde, my Debian Linux system? And what care I would create throughout the process?

    1 reinstall 8.1 can I leave HP recovery disks that I made at the beginning (and hope that does not erase the Linux partitions, I created afterwards - I need more than "hope" in fact, I need evidence-based knowledge on this one!). And then upgrade to Windows 10.

    2 install a Windows 10 fees (from DVD created from the .iso file downloaded from Microsoft), hoping that it activates properly with the key contained in the UEFI BIOS (I think that this 'hope' is pretty much made to knowledge database) and then get all the goodies of HP... by a simple download from the HP site?

    I think option 2 is the safest (and fastest also!) but I'd well informed comment before that I have try.

    Thanks in advance.

    Hello:

    Option 1 is the only way you will get to keep the programs provided HP with your PC, and they reformat the hard drive, so you will lose everything.

    Option 2 will put a clean install of W10 on your C:\Drive and you will be able to leave everything intact, unless you format the hard drive.

    If your current installation of W10 has been successfully activated, W10 will automatically activate once you install it again once you're connected to the internet.

    To install W10 in this way, you select the "I don't have a product key option,' when you get to when Windows asks for the prouduct key.

    The only software and you will be able to install the drivers which will be available on the page of the driver and support for your laptop.

  • Best way to display a report of the hierarchy tree to APEX 4.2

    I have a hierarchical query spans four levels over two tables.  The application works very well and also includes columns hierarchical sum (i.e. the parent displays the sum of all children) using functions.

    I wonder what is the best way to view these data for users?

    At the moment I think I would have a collection now my connection with the edition special 'show' column.  Then I would include HTML to define values correct show/hide and refresh the report when you click on a node.  In my view, this would probably work, but may not be the best way.

    I disassembled my request for necessary columns (no column of the sum) and the tree APEX regions work well for this.  Y at - it a plugin alternative jquery or anything that people with what will give me the directory structure 4.2 native while allowing me to display additional columns with links?

    If I need to provide more info let me know!

    LSDev wrote:

    I'm going to use today to test these ideas, and if they don't work I'll go with the classic report hack, I thought.

    AEC: I'll try the plugin and report back on the question if I can get the links to work.

    The plugin code is clear and simple. However, the links generated HTML text in the query as:

    ...
    '' || apex_escape.html(ename) || '' employee
    ...
    

    does not work out of the box as the plug-in is escaping in HTML output column values:

        -- Render all other columns
        FOR j IN 3 .. l_value_list.count
        LOOP
          sys.htp.p('' || sys.htf.escape_sc(l_value_list(j)(i)) || '');
        END LOOP;
    

    This can be changed to allow the links:

      -- Render all other columns
        FOR j IN 3 .. l_value_list.count
        LOOP
         IF l_value_list(j)(i) not like '' || l_value_list(j)(i) || '');
        END LOOP;
    
  • Best way to sort, organize and delete the RAW files?

    Hello world

    I am looking for a way to simply sort through a series of close to 600 raw on a Mac files.  I'm very new to this, so bare with me :)

    At first, I downloaded the raw files from my SD card in my iPhoto which led to all the files in JPEG format.  So I decided that it was no good, so I tried to put the CR2 files in an organized folder and dragging the file in the preview.  I find that the preview is verrrry slow.  I'm looking for the best way to sift through

    These files and choose the best/remove the worst.  What do you recommend? I plan on changing the files in Photoshop and Lightroom.

    Is there a place in Lightroom where I can get this sort of process I speak of? Or do I have to download another type of organization program offline?

    Thank you

    If you mean the word "out" the process of getting rid of the 'bad' images, and Yes keeping 'good' images, Lightroom can do this as many other programs.

    In Lightroom, you would import the 600 images together, and when the import process is completed (this may take a few minutes or more depending on your computer), then you can scroll through each image and if you decide that it is a 'bad' image that you don't want to keep, press X, then go to the next image. Once this is done, you can delete all the photos that you have assigned X in a single action.

    Other programs will probably allow you to do this "spell" faster, but I can't talk about them.

  • Best way to transfer a subset of the catalogue with files sidecar from one computer to another?

    I'm recently sent to me to take pictures in Costa Rica as part of my work but had to bring my own laptop because it is not suited to my workplace. While that on the road, every night I loaded the photos I had taken this day here on my computer and often started to change. Now, I'm back at home and want to move all photos of travel as well as all files XMP sidecar from my laptop to my desktop computer at the office. What is the best way to do it? I don't want to transfer all the photos on my laptop (pictures of my children, for example), and I don't want to lose the changes that I've already done everything outside the office.

    Please notify.

    Select the pictures you want to copy and then export as catalog including pictures on an external drive. Then, on your desktop, you import catalog.

    A simple google search will be several links to articles and tutorials on how to do it.

  • What is the best way to remove a hum in the context of multiple clips

    I have about 40 short excerpts with the same buzz in the background. What is the best way to get rid of it? I know how to make a video, but I can do everything at the same time? When the workflow is the best time to do this? Should I use an adjustment layer?

    Thank you!

    I always do everything removing Hum as the first operation. As Bob says it depends on snoring, but if it's typical induced current then the DeHummer tool is the best to use. Once you have found the right settings you can save as a favorite and the use of batch processing to remove all clips at once.

  • What is the best way to call a method in the bean on the adf page loading?

    Hello

    which is the best way to call a method in managing the beans on the adf page loading.

    My version of jdev 11.1.1.5.0

    Thank you

    I don't know if it's the right answer for your question try this...

    In taskflow for properties of method call, you must return a value when you use #{pageFlowScope.returnvalue} (returnvalue is a variable), so you can use your return value in the taskflow... Please let me if this is correct...

  • The best way to set default styles in the libraries of widget for use by the public?

    I am putting together a code to go with my blog, and it will include a custom component. I would like to than the default component to use a style that I set, but I also want the user to be able to replace it easily. Anyone have any suggestions on the best way to do it?

    I see that the range slider [url http://www.jidesoft.com/blog/2011/10/04/meet-our-first-javafx-component/] of JideSoft we explicitly setting the skin in code in their example. Ideally the end-user would not do that. So, what is the best practice? Should I create a skin for my component and then set the style in my code? Should I set a basic style sheet that somehow always is imported, etc.?

    Essentially, I want to have my base of work styles in the same way that caspian.css is - is possible?

    I gave a talk at JavaOne on creating custom controls, perhaps the slides can be useful in answering some of your questions. I blogged about my three talking:
    http://fxexperience.com/2011/10/slides-from-JavaOne/

    In particular, you will be probably more interested by the following slide deck:
    https://oracleus.WingateWeb.com/published/oracleus2011/sessions/24140/S24140_2556650.PDF

    Hope that helps,
    -Jonathan

  • Best way to deal with pictures from the start? (Bridge CS5 and iPhoto)

    Hi all

    I am just learning the strings of all the suite CS5 and began to add keywords etc in bridge, when I realized that I couldn't access the files in my iPhoto library ('09). I read a few threads on this topic, but have not really found a consensus on how to deal with it.

    I think I'm in a good position to get things right from the start, because I have no tags or sides etc. in my configuration of iPhoto (and only add keywords for the few photos that weren't in my iPhoto library), and wonder what you think is the best way to sort photos given I intend to use them in web design etc. and all the parts of my suite CS5.

    If the photos in iPhoto is the best what is the best way to do it? I have read suggestions do a right-click on the library and click "Show content" - or something like cela, but that does not come up as an option when I right click my iPhoto in Bridge library. Thanks a lot for your help!

    Please let me know if there is any info I could give you that could be useful in order to understand this one.

    Best,

    Mara

    PS: for the temporary folder, I use a name like to-do Images

    Remember once the keywords are used is not just the manipulation/image adjustments which are important metadata but also robust observation with integrity

Maybe you are looking for

  • Problem starting Satellite M40 - windows didn't start up properly

    Satellite M40 running XP Home, an 80 GB HD, 2 partitions, (System on C:, data on D :) During bootup, current sector has been disconnected (no battery in the laptop). When I try to start it again, go to the screen (sorry for the "mixed-language french

  • Several facades in the same program.

    Hello I want to do a program that includes three steps. The first request for the location of the file and file name, phase II material request initiated and the final step is the software running. I want all the data from the first two stages to be

  • My vi crushes always on the same file

    Hello My vi filled a table inside a loop, and when it ends then it must save table to a file of lvm. My problem is that it always crash on the same file instead of increment of its name as confirured in the Main.vi "registration". simplified "Rempli_

  • SoftMotion and FPGA OR 9514

    Hey Gang, I spent the day to set up a new system of cRIO and a new installation of LV2012 RT and FPGA Softmotion. Our system uses a CAN interface, which, we learn, requires the use of FPGA mode.  Maybe this isn't a bad thing, because we are concerned

  • How to remove a Trojan allowing horse to the my computer when I did a scan? It's URGENT

    How to remove a Trojan allowing horse to the my computer when I did a scan?  There were 2 Trojan horses that was the same things and 1 was deleted and the other was allowed.  How can I remove it?  They are as follows: Trojan horse: JS / Redirected.EV