Navigation with MouseListener

Hi!
My navigation goes wrong, but perhaps it's an easy answer to it?
In my application I have a JFrame with BorderLayout.
In West I have a JPanel with some JLabels ( let's call them A, B and C)
creating a menu with 3 alternatives and in Center I have ( in the start )
a JPanel 'aPanel' with many components with different LayoutManagers.
Then the user clicks on B 'bPanel' with it's content is to be shown
in Center and the same for the C alternative. I use MouseListener for
the mouse click on the labels.
In the mouseClicked method I invoke one of three open methods for the choice and
inside thoose to make the change I use:
container.remove(aPanel)
and after making some changes to the components to be shown:
container.add(bPanel, Border....)
Many of the components are used in all three alternative JPanels.
What's my problem?
Click B - 'bPanel' appears, click C - 'cPanel' appears, good,
then click any of the alternative and everything goes wrong, only some of
the components in the panel are shown and perhaps on the wrong place. Why?
If I hardcode the invoke of the methods (not using users choice) I can walk
around a, b, c, b, a, c and everything in shown perfectly!!!!
If you have any idea, please help me!

thanks for reply
getting below error hencecanot assign p*nts
An error has occured while assigning points. Please refresh the thread view and try again.

Similar Messages

  • Navigation with rollovers

    Hi,
    I have the nice task to evalute the Portal of the 9iAS v2.
    We have a nice web which should be ported to the Portal.
    I have there a nice Navigation Bar with rollovers.
    How can I build this navigation? I can use "Page Links" from the items to build a navigation with links.
    But I want to use images.
    My questions:
    1. Are there any build in features to do images with links - rollovers with links
    and if not - how can I do this.
    2. when I use Page Links I can find the right page just by name - how can I do this when
    I have to enter this manually?
    thanks a lot,
    michael

    Here's the bad news - letting a graphics application write the HTML for a production site is not a viable method.  The tables produced are completely rigid and will break unexpectedly as you build your page and add content (thereby changing the 'shape' of the original layout plan).  Please read this to see why that's the case -
    http://www.apptools.com/rants/spans.php
    The spans are what create "gaps" unexpectedly as the table tries to maintain its shape.  I believe the only way to fix this is to not use that FW HTML at all.

  • Best approach -Tabs based ADF Tree left side navigation with Dynamic Regions with out UI Shell

    Hi,
    Somebody can help for the best approach to implement the following requirement.
    Req: When the user select the ADF Tree left side navigation menu, each menu will open as multiple tabs(Dynamic Tabs) in right side content area with out UI Shell Template.
    I completed the
    Step-1: From the Model project, I can able to render ADF Tree in the using view and view links. I can get the adf tree which is having 3 menu items. Each menu item having 2 sub menu's.
    I took each menu item as one(1) taskflow, each taskflow will have two(2) fragments.
    Total I have 3 task flows as Menu Items and 6 fragments for sub menu's.
    Step-2:  My question is How do I implement Tab based the ADF tree navigation (left side area to dynamic regions in content area) through dynamic regions? Please provide the steps in view layers.

    Than ks for your response.
    This is working fine for ADF Tree navigation with dynamic regions if the taskflow having only one fragment. if the taskflow having more than one fragments, this will not work. The following conditions are always satisfies one page fragment of either "employees" or "departments" task flow.  If the "employees" task flow have 2 page fragments, it's not work even you pass parameters through routers.
    public TaskFlowId getDynamicTaskFlowId() {
    if (currentTaskFlowID == null ||
    currentTaskFlowID.equalsIgnoreCase(“employees”)) {
    return TaskFlowId.parse(employeetaskFlowId);
    if (currentTaskFlowID != null &&
    currentTaskFlowID.equalsIgnoreCase(“departments”)) {
    return TaskFlowId.parse(departmetaskFlowId);
    return TaskFlowId.parse(employeetaskFlowId);
    My question is "Same use case with Dynamic Tabs" when the user click on any adf tree node.

  • Using Spry Vertical Navigation with Templates-Need to indicate current page

    Using Spry Vertical Navigation with the Dreamweaver templates.  Using editable attributes etc., the current page mennu item does not seem to be changing.  How do you indicate the. current page.

    Persistent Page Indicator on Site Wide CSS Menus:
    http://alt-web.com/Articles/Persistent-Page-Indicator.shtml
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • JTable's Cell navigation with TAB

    Dear ALL
    I have face one problem in JTable's cell navigation with TAB. The problem as describe bellow.
    I have two columns NAME and ADDRESS. Set focus on ADDRESS column's first cell. now if i am press tab key then focus controll comes on second cell which is the ADDRESS column. At the end of row controll comes on first row second column that means focus on ADDRESS column's first cell.
    Please give me some hints.
    Thanks in advance.
    Amit

    Your description doesn't make any sense (to me at least) so I don't know what your problem is or what you are asking to be changed.
    The normal tab order is Left to Right, Top to Bottom. So if the focus is at the top/left normal tabbing would be:
    Row 0, Column 0 (name 0)
    Row 0 Column 1 (address 0)
    Row 1, Column0 (name 1)
    Row 1, Column 1 (address 1)
    Row 2, Column 0 (name 2)
    Row 2, Column 1 (address 2)
    Your question seems to imply that your tab from address to addreass, which doesn't make sense.
    "Set focus on ADDRESS column's first cell. now if i am press tab key then focus controll comes on second cell which is the ADDRESS "

  • Any Security Problems with Navigation with Short URLs?

    Hi ,
    I want to use Navigation with Short URLs for my users to access the portal. But if the users give that Short URLs to other non-users , will the URL open?
    I will give the role for the users only. Non-users will not have particular role.
    Are these Navigation with Short URLs are safe to use?
    Advise me.

    Hi,
    The iview have "EveryOne Role" and "Super Admin Role".
    The portal will not allow any "anonymous" users, because it needs atleast "EveryOne Role" for the access.
    Will this create any problem.
    I think the "EveryOne Role" is there for the user, if the iview1 assigned for role1 but still in the permissions of iview1 have the "Everyonerole" , it is allowing user to access this right?
    Then I need to remove the EveryOne Role from the permissions.
    Regards
    Kiran

  • Page navigation with SelectOneRadio

    Is it possible to do page navigation with just selectOneRadio choice and without link or command button?
    <h:form id="form1" styleClass="form">
                   <h:selectOneRadio disabledClass="selectOneRadio_Disabled"
                        enabledClass="selectOneRadio_Enabled" id="radio1"
                        styleClass="selectOneRadio" layout="pageDirection"
                        value="#{Main.selectedValue}"
                        valueChangeListener="#{Main.handleRadio1ValueChange}"
                        immediate="true" onclick="submit()">
                        <f:selectItem itemValue="page1" itemLabel="page1" />
                        <f:selectItem itemValue="page2" itemLabel="page2" />
                        <f:selectItem itemValue="page3" itemLabel="page3" />
                   </h:selectOneRadio>
                   <br>
              </h:form>
         public String handleRadio1ValueChange(ValueChangeEvent valueChangedEvent) {
              String s = (String)valueChangedEvent.getNewValue().toString();       
              return s;
    And faces-config:
    <navigation-rule>
              <from-view-id>/main.jsp</from-view-id>
              <navigation-case>
                   <from-action>#{Main.handleRadio1ValueChange}</from-action>
                   <from-outcome>page1</from-outcome>
                   <to-view-id>/page1.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>

    I hope u figured out a solution for this post already. But, if not u can try this. It worked for me.
    In the change listener method, add these few lines for redirecting the control to required page.
    FacesContext facesContext = FacesContext.getCurrentInstance();
    ExternalContext externalContext = facesContext.getExternalContext();
    facesContext.responseComplete();
    HttpServletResponse response = (HttpServletResponse) externalContext.getResponse();
    try {
    response.sendRedirect("abc.jspx");
    } catch (Exception e) {
    e.printStackTrace();
    Regards, Hari.

  • Horizontal Navigation with Dropdown Menu

    Hello!
    I am trying to put together a site with Horizontal navigation with items in the dropdown. I built my plan with main pages and child pages, and added my horizontal navigation on the Master page, but when I go to preview, I don't see any of my dropdown (child) pages. Is there any way to fix this? (I've attached a screenshot, hopefully this will help clarify)......

    Hello,
    Please click on the tiny white Arrow in the blue circle which comes up at the top right of the Menu. And there change the Menu type from Top Level pages to All pages.
    Note : Child pages on the same level in Plan view are listed vertically in a Horizontal Menu.
    Regards,
    Sachin

  • Cross Site collections navigation with publishing feature enabled into sharepoint 2010??

    Hi,
    Is it possible to cross site collection navigation in share point 2010 with publishing feature enabled? Right now we have a site collection with all the departmental sites within it. We are trying to create separate site collection with separate content
    database for each department for better management. But problem with Global navigation as OOB does not provide cross site collection navigation functionality, So looking for multiple site collections or navigation for more than one site collection under single
    umbrella. i was able to get the cross site collection navigation in my development env without publishing feature enabled using below link. But problem with production environment, as all the site collections and sites are publishing feature enabled. how i
    am gonna do cross site navigation with publishing feature enabled? 
    http://www.itsolutionbraindumps.com/2011/10/sharepoint-2010-cross-site-collection.html
    Any link or suggest will be greatly appreciated !

    Hi,
    According to your description, my understanding is that you want to create cross site collections navigation with publishing feature enabled in SharePoint 2010.
    Publishing sites (sites with publishing infrastructure) have their own navigation API, and it is much more complicated task to preserve cross-publishing sites navigation.
    We need to implement our own custom navigation provider.
    Please refer to the link below about the cross site collections navigation with publishing feature enabled:
    http://sadomovalex.blogspot.com/2010/12/cross-site-and-cross-site-collection.html
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • Error on page when navigating with in webdynpro applications

    Hi All,
    I have developed 5 different webdynpro applications. I need to navigate between these webdynpro applications. I am handling the navigation with in the webdynpro applications.
    The problem is after some time ( after navigating to the second or third level) when I try to click on the tabs(top level navigation), the JAVA SCRIPT ERROR is coming.
    And any other tabs are not coming.
    ERROR is: 'Error on page'
    ERROR Description is:'Problems with the web page might prevent it from being displayed properly or functioned properly'
    Any suggestions are appreciated.
    Thanks & Regards,
    Seshu

    Hi !,
    Please can you tell me what to do if you DO NOT want to destroy the source application when navigating away from it?
    For example...  Webdynpro App #1 calls Webdynpro App #2,
    Webdynpro App #1 will always stay visible and available to the user in there toolbar in the portal.  However after I click "Go" to trigger the navigation to Webdynpro App #2, then the next time I hit "Go", Webdynpro Application was destroyed out of memory I believe.

  • PDF Portfolio Navigator with horizontal tab layout

    Hello, Experts
             I am trying to create a PDF Portfolios with horizontal tab layout structure;
             several .NET libraries allowed me to create PDF files with thumbnail layout, but, in order to populate a horizontal tab
             layout, it seems, I would need to create a custom PDF navigator and import it into PDF Portfolio prior to inserting PDF file components ?
            preinstalled navigators look great, but I just need a simple horizontal tab view, where each tab only contains file's name and nothing else;
             buy clicking on each tab - corresponding file would be activated in the viewer
           is there any library of predesigned navigators that I can use ?
            is there any way to extract navigator from one and import it into another PDF portfolio ?
           would I need to use Flash or can this be done via .NET ?
    Best Regards,
    -Alex

    tried to install Portfolio SDK
    can't see the Navigator project wizard in Flex Builder  (  4.6 )
    The plugins have been extracted to:
    C:\Program Files\Adobe\Adobe Flash Builder 4.6\eclipse\plugins
    The NavigatorSupport folder has been extracted to:
    C:\Program Files\Adobe\Adobe Flash Builder 4.6\eclipse and ( just in case ) to
    C:\Program Files\Adobe\Adobe Flash Builder 4.6\

  • Creating arrow navigation with a photo gallery

    I am in the process of creating my own phtoography website. I created all the pages in Photoshop, sliced them and am now using dreamweaver to add interactivity.
    The class I took showed us how to make remote rollover images with small thumbnails that you can rollover that make the large version of the image appear on the same page.
    I have decided not to do that but instead use arrows and the number of the photo in the series as the navigation.
    Now that I am actually creating the page in DW I am realizing I don't really know how to do what I want...and can't figure out how to word a question to google an answer.
    This is a photo of part of my page...
    I want the user to be able to hit the arrow on the left or right and cycle through the images.
    Hit the left arrow and it goes to image 9/10 [image 9 of 10 images in the series], also the numbers in the center would change.
    Hit the right arrow and it goes back to image 1/10.
    I am hoping this is possible. Any help or links to tutorials on this would be GREATLY appreciated!
    Thanks.

    Welcome Alex  -
    Any picture you display on your site can be saved to the visitor's computer.
    If you ZIP each gallery, a simple link to the zipped archive will offer the visitor
    an option to save to their computer.

  • Issue with mouseListener / global variables

    So in my project, im having an issue with incrementing a counter using mouseListener. i have 2 windows pop up telling the user whose turn it is and then that players dice roll. after this i want the program to wait untill the player moves their piece. after they have moved their full move, it should go on to the next player. the issue im having is getting the program to wait for the player to make his moves, and i cant quite get it to work. it either skips the move and goes to the next player or never sees that the player has moved fully.
    public int getTurnsLeft(){
    return turnsLeft;
    public void setTurnsLeft(int newTurnsLeft){
    turnsLeft = newTurnsLeft;
    }these are what im using for both my mouseListener release method and my playTurn method to get and set the number of moves left.
    public void mouseReleased(MouseEvent e) {
              if(playerPiece == null) return;
              playerPiece.setVisible(false);
              Component c =  playBoard.findComponentAt(e.getX(), e.getY());
              if (c instanceof JLabel){
                   Container parent = c.getParent();
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              else {
                   Container parent = (Container)c;
                   parent.add(playerPiece);
                   setTurnsLeft(getTurnsLeft() + 1);
                   System.out.println(getTurnsLeft());
              playerPiece.setVisible(true);
         }mouse release method
         public void playTurn(){
              JOptionPane.showMessageDialog(null, "Player " + this.getPlayerNum() + "'s turn");
              int turns = (int)diceRoll();
              this.setMoveCount(turns);
              System.out.println(turns);
              int turnCheck = 0;
              while(turnCheck == 0){
                   System.out.print(getTurnsLeft());
                   if(getTurnsLeft() < turns)
                        turnCheck = 0;
                   else
                        turnCheck = 1;
              setTurnsLeft(0);
         }play turn method
    when i run this, the mouseRelease method can modify turnsLeft and get back the correct number, but in the playTurn method, i only get 0, which is what turnsLeft starts at. shouldnt they both get the same value, since there getting the value from the same source? or is the while loop the issue here?

    Your turnsLeft is really deceptively named, it is actually the number of steps taken during the current turn. Better rename it for clarity.
    The problem seems to be in your threading, I don't see how the while loop can end ('never sees that the player has moved fully'?) unless the diceRoll returns zero ('skips the move').
    What you should do is print out that diceRoll for more information (why doesn't it return an int? Use random.nextInt(maxSteps) + 1).
    And probably the end-of-turn check should be in setTurnsLeft(). You need to store the 'number of step this turn' as a class variable.
    So rename:
    playTurn -> startTurn
    turns -> steps
    turnsLeft -> stepsTaken
    setTurnsLeft(int) -> completeStep() which checks if stepsTaken >= steps and if yes calls completeTurn() which can check for a win or call the other players startTurn().

  • Looking for a way to add a footer navigation with sub-pages listed underneath parent pages?

    The navigation widgets work great for mast navigation and sidebar navigation, but no so good for footer navigation.
    Is it possible to display main pages horizontally and have any sub-pages listed underneath? The only option I appear to have is to use the horizontal widget and make do with hover triggered drop downs - not great for footer navigation.
    If anyone knows how to do this or can point me in the right direction I'd really appreciate it. I\m just starting out with Muse, think it might make a great wireframing tool.

    Hi
    You can create a manual menu as footer navigation, where you can add the sub menu items as you want to show up with mouse action.
    Helpful link :
    http://www.lynda.com/Muse-tutorials/Adding-Menu-widget/123518/131179-4.html
    Additionally , you can checkout the menu here :
    http://muse.adobe.com/exchange
    Thanks,
    Sanjit

  • Navigation with Short URLs for T.Code Published in the portal()

    Dear Expert
    We have the following issue:
    Requeriment:
    We created a report ABAP in the R/3. For this Report, the ABAP Team created a t.code ZPORTAL. For this t.code we created a service ITS in the t.code SICF, the name of this service is ZPORTAL. In the portal we created an type of iView IAC for call this service and assign the Iview to a page. And the Page to a role customer.
    In this moment the service work fine. The problem initial was that when the enduser press the button exit(Finalizar) the portal display the message Logged Off Successfully .
    We write in the forum of sdn with the following link:
    Logged Off Successfully
    And we made the step in the help.sap.com; But the result not is the that we wait.
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/7b8163404448e7aad7899c0b30313e/frameset.htm
    Please you can help me with suggestion.
    How can solve my issue and get the result that we wait..
    I can send documentation with the steps that I made, and the result that I want get.
    With kind regards
    Regards

    Hi,
    At System Administration > Navigation > Short URLs, the Short URL is activated?
    Can you see some URL codes on this page?
    Best regards
    João Macedo

Maybe you are looking for

  • Adobe XI Pro forgot to uninstall, erased, need to install on new computer

    & my Product code doesn't work.  Any help appreciated. Thanks

  • Crosstab query using  PL/SQL [HELP]

    hi all, i got this output after execute my query: week no | department | item | budget 1 | 0901 | salary | 25000 1 | 0901 | stationery | 5000 1 | 5501 | salary | 45000 2 | 0901 | salary | 25000 2 | 5501 | salary | 25000 2 | 5501 | stationery | 100 i

  • Oracle Discoverer: How to handle null value

    In Oracle Discoverer, I pull data from a folder. When I hit Null value for a column, I want to replace it with data from another folders column. Something like the functionality of "nvl" of a SQL statement. How can I do the following query in Discove

  • Incomplete Data - Synchronization process

    Hi! Everyone When I want to get a new information I have to sync. But I have to do the synchronization process around three to four times in order to get new information. Can anyone tell me what is the problem I am having ??? Why I am gettign the mes

  • SQL Management studio 2014 error

    While installing Sql management studio, error showing that Could not write value to key\Software. Verify that you have sufficient access to that key, or contact your support personnel . I Have right click on setup file and click on Run as a administr