Two UI class for a component in One application

Hi!
I created my own Look and feel and say take a exmaple of Button & wrote a MyButtonUI but later on I determined to have one basic Windows UI for it at some instances say the places in Jtable where I rendered one cell.
But still cud not found a way to set the other UI.
This case can be understood like "how to set the different UI for some specific components on some specific places?"
Need HELP...URGENT!
regards
JOY

I didn't test the problem described, but it seems to me that UI can be set personally for each instance of your class. Did you try to overload method setUI() and updateUI() to control what happens to UIs of your instances? E.g.:
theTree = new JTree(treeModel) {
public void setUI(javax.swing.plaf.TreeUI ui) {
if (!(ui instanceof MyUI)) {
// ignore this call.
else
super.setUI(ui);
public void updateUI() {
This example sets the UI to some predefined implementation, and disallows to change it afterwards. You could use the idea to control what UI is used for each specific instance of your class.

Similar Messages

  • Deployment Issues, Different  Jars for Diff Java in one application.

    HI,
    I need to put classpath (Jars) for my WEB-INF/classes. Different Jars for Diff files in one application.
    The problem is , for one ofmy application, the lib files are x.jar and y.jar , x is older than y but have same
    lib files. in x and y, there is one class , r.java , which have a method method1(). whey they are doing modifications in y.jar , the r.java has changed to new vertion, the method method1() they re-written the body.
    My application have 5 java files, in which 2 files uses r.java imported from the x.jar earlier.
    Now we need to use y.jar because , the y.jar have more files added with good futures. But the earlier 2 files are giving exception if i use y.jar.
    I need solution for this. how can i put classpath for the 2 files to use the x.jar and other files to use y.jar in the same application.
    I am using a Tomcat 4 server. only Servlets, JSPs I am using.
    Thank you,
    Kiran

    I may be missing something here, is y.jar a newer version of x.jar? And if it is do you need x.jar at all? Are there classes in x.jar that do not exist in y.jar? Can you modify your application to provide the same functionality and only use y.jar?

  • Two Valuation Class for one material type which is split valuated

    hi , I have a material number which is split valuated like Capital & Revenue. There are seperate inventory GL accounts for both Capital & Revenue. So whenever material is procured based on the nature either Capital or Revenue , Corresponding Inventory GL account gets debited. How t

    It is very much possible. Material type is linked with Valution class by account category reference and has many to many relationships. Valution type is linked with account category reference.
    1 You create the material at valuation category level in MM01
    2 Extend the material for Val type 1 with Val cls 1 in accounting view
    3 Extend the material for val type 2 with val cls 2 in accounting view
    for example
    If you have valution type IN & EX linked with ROH material type via account category reference then you have the option to selecte valution classes 3000, 3001, 3002, 3003 in Std SAP. You have to make sure that Automatic account determination setting are correct for the valustion classes selected in OBYC.
    Hope it helps
    Karthi

  • Two earlywatch reports for same instance in one Solution manager

    Hi
    i am trying to create two solutons for early watch reports for same instance. let me explain here.
    In SAP Solution Manager: Active Solutions  >>> i have two solutions like this
    Solution                                                          Early Watch Alert Reports
    Avnet Global Solutions         >>>> here i have configured the PR1, PB1 PCB instances
    PR1                                      >>>>>here i configured the only PR1 instance.
    so i have configured the same instance in two solutions.
    i am not gettting the early watch report automatically  after after configuring like this . but manually working fine.
    when i kick of the report manually working fine.
    here my question is ... do i can create two early watch reports in one solution manage for same instance or not.  if yes then why i am not getting report automatically.
    Thank you
    Vish

    Dear Paul,
    Thank you for your response
    this is what i got from SAP.
    Hello Vish,
    You can have the same system in different solutions. With regards
    to why the report is not generating automatically, please review
    SDCCN on the satellite system.
    I dialed into the system and found that the SDCCN for PB1 is not
    downloading the sessions from Solution Manager.
    I would recommend that you deactivate and then activate SDCCN.
    Tcode SDCCN -> GoTo - Settings - Task Processor - Deactivate
    Tcode SDCCN ->Utilities -> Activate
    Then create a Refresh Session task and verify if the upcoming sessions
    are getting pulled down to PB1.
    If you need help with this, please let me know if it is fine with you
    if I make the necessary changes to get the system working.
    Thank you in advance and best regards,
    Jared Singh
    SAP Active Global Support - Netweaver Web Application Server
    could i know your comment

  • Is it possible in IOS to have two static routes for the same subnet, one a higher priority and "failover" between the 2?

    Hi All
    Is it possible in IOS to have for a particular subnet:
    a) Two static routes?
    b) Make one static route a higher priority than the other?
    c) If one static router "goes down", failover to the lower priority static route?
    We have a l2tp/vpdn connection to a supplier which can be accessed via two vlans/routes. I would like to make one route the preferred one but the "route" to failover if the preferred route goes down.
    Again, many thanks in advance for all responses!
    Thanks
    John

    Hi John,
    Hope the below explaination will help you...
    R1(config)# ip route 0.0.0.0 0.0.0.0 2.2.2.2
    R1(config)# ip route 0.0.0.0 0.0.0.0 3.3.3.3 10
    If you notice the Administrative Distance for the secondary route pointing to ISP2 is increased to 10 so that it becomes the backup link.
    The above configuration with just two floating static routes partially accomplishes our requirement as it will work only in the scenario where the routers interfaces connected to the WAN link are in up/down or down/down status. But in a lot of situations we see that even though the links remain up but we are not able to reach the gateway, this usually happens when the issue is at the ISP side.
    In such scenarios, IP SLAs becomes an engineer's best friend. With around six additional IOS commands we can have a more reliable automatic failover environment.
    Using IP SLA the Cisco IOS gets the ability to use Internet Control Message Protocol (ICMP) pings to identify when a WAN link goes down at the remote end and hence allows the initiation of a backup connection from an alternative port. The Reliable Static Routing Backup using Object Tracking feature can ensure reliable backup in the case of several catastrophic events, such as Internet circuit failure or peer device failure.
    IP SLA is configured to ping a target, such as a publicly routable IP address or a target inside the corporate network or your next-hop IP on the ISP's router. The pings are routed from the primary interface only. Following a sample configuration of IP SLA to generate icmp ping targeted at the ISP1s next-hop IP.
    R1(config)# ip sla 1
    R1(config)# icmp-echo 2.2.2.2 source-interface FastEthernet0/0
    R1(config)# timeout 1000
    R1(config)# threshold 2
    R1(config)# frequency 3
    R1(config)# ip sla schedule 1 life forever start-time now
    The above configuration defines and starts an IP SLA probe.
    The ICMP Echo probe sends an ICMP Echo packet to next-hop IP 2.2.2.2 every 3 seconds, as defined by the “frequency” parameter.
    Timeout sets the amount of time (in milliseconds) for which the Cisco IOS IP SLAs operation waits for a response from its request packet.
    Threshold sets the rising threshold that generates a reaction event and stores history information for the Cisco IOS IP SLAs operation.
    After defining the IP SLA operation our next step is to define an object that tracks the SLA probe. This can be accomplished by using the IOS Track Object as shown below:
    R1(config)# track 1 ip sla 1 reachability
    The above command will track the state of the IP SLA operation. If there are no ping responses from the next-hop IP the track will go down and it will come up when the ip sla operation starts receiving ping response.
    To verify the track status use the use the “show track” command as shown below:
    R1# show track
    Track 1
    IP SLA 1 reachability
    Reachability is Down
    1 change, last change 00:03:19
    Latest operation return code: Unknown
    The above output shows that the track status is down. Every IP SLAs operation maintains an operation return-code value. This return code is interpreted by the tracking process. The return code may return OK, OverThreshold, and several other return codes.
    Different operations may have different return-code values, so only values common to all operation types are used. The below table shows the track states as per the IP SLA return code.
    Tracking
    Return Code
    Track State
    Reachability
    OK or over threshold
    (all other return codes)
    Up
    Down
    The Last step in the IP SLA Reliable Static Route configuration is to add the “track” statement to the default routes pointing to the ISP routers as shown below:
    R1(config)# ip route 0.0.0.0 0.0.0.0 2.2.2.2 track 1
    R1(config)# ip route 0.0.0.0 0.0.0.0 3.3.3.3 10
    The track number keyword and argument combination specifies that the static route will be installed only if the state of the configured track object is up. Hence if the track status is down the secondary route will be used to forward all the traffic.
    Please rate the helpfull posts.
    Regards,
    Naidu.

  • Can i have two apple accounts for seperate phones on one computer

    i have two iphone work and buisness can i have seperate apple accounts on one computer, to keep contacts etc seperate

    Hi there themaples20,
    You may find the information in the article below helpful.
    iCloud: Features that work with one account at a time on iOS 5 and OS X Lion or later
    http://support.apple.com/kb/ts4020
    -Griff W. 

  • Using two Button classes for single Button control MFC

    Hi,
    Here is my problem:
    I have a VC++ MFC dialog based application. There I am adding a Button to my dialog by just drag and drop from the tool box.
    I am also having a MyCustomButton.dll to give new looks to the button.
    Inside MyCustomButton.dll, MyCustomButton.cpp is the button class which is derived from CButton. 
    Now I want the behavior of my application in such a way at execution of my application, like if the  MyCustomButton.dll is present in system then the button of my dialog should look like as per implementation of MyCustomButton.dll, where as if the dll
    is not present normal MFC button should get displayed.
    Please guide me in achieving this. How can I make my application (*.exe) decide at run time.
    Thanks in Advance,
    Thanks & Regards, Mayank Agarwal

    Thanks Rupesh,
    But my requirement is like that only I have to decide at run time.
    Please look the scenario below:
    //  MyDialogDlg.h //
    #include "MyCustomButton.h"
    class MyDialogDlg
    MyCustomButton m_CalcButton;
    In the above piece of code
    m_CalcButton is object of  MyCustomButton class.
    and my requirement is such that if MyCustomButton
    .dll is not present then,  m_CalcButton should executed as the object of CButton class of MFC.
    There are cases where I  cant ship the dll.
    In such case how should I write the code? Please guide.
    Thanks in Advance.  
    Thanks & Regards, Mayank Agarwal

  • Fullscreen for a component not a application?

    There's any possibility to trigger the fullscreen for only a component inside a flex application? I've made a player which is inside a flex application, the problem is that when I switch to Fullscreen all the application goes, not only the Player.
    Maybe a workaround should be to put the Player in another container, and when switching to Fullscreen make that component 100% width and height, but may be there's a better way
    Any idea?

    If your requirements and application is small and simple then I think that Tomcat is OK atleast Tomcat is clean and simple. Tomcat gives you slight better performance as compared to JBoss on simple sites but please google to find out how can you tune your tomcat to give you desired output.

  • Valuation class for imports and domestic material

    Hi,
    We wanted to hit different GLs for domestic and Imported materials inventory and therefore we have defined two valuation classes for Domestic and Imported material and these  valuation classes are attached to respective materials in account view 1.
    But now our problem is , we have few materials which are procured from domestic market as well as Aboard market.
    Therefore now we are facing problem how to hit correct GLs based on the nature of procurement.
    Thx in advance...
    Regards
    Sandeep marwha

    use split valuation , since materail details is a master record we cant dupoicate .
    so use split valuation and give a diffrent valuation class which correcponds to a diff gl account .
    so when ver u create a Po givethe valuation type also , so that at Gr doing time , the stock will hit that gl act only. other wise will create issue , it will be grayed out while doin Gr .

  • One application won't open for one user

    We are doing a rollout of Macbook Pros to a group of people. We have used migration assistant for 20 computers. One application will not open for one user on each of the computers. The applicaiton will open for users that are added, but not the admin user that the application was originally installed. We have tried uninstalling and reinstalling the application with the same results. The one user can not log in. The permissions look right for all files.

    How about clarifying some things for me? Does each machine have a different admin user? What user installed the application that won't open (you say there is only one?) How many users on each machine - one or many? How many admin users are there? How many users are Standard or Managed users? What user "can not log in?" Is this on one machine or all machines? Which is the application that won't open, where is it installed, what are the permissions for the application, what are the permissions for the folder in which it's installed?
    Are these computers on a network or operating standalone or does each person in the group have their own separate machine?
    From where did you migrate for these 20 computers and why did you use Migration Assistant? MA is not the correct tool for doing a multi-system configuration. This is usually done using a net-based installation from a machine running OS X Server or from an XServe or by creating a standard system DVD and installing via ASR.

  • Class organisation of a GUI based application

    I am interested in some tips on how to organise classes in a application that has a GUI.
    I am not sure how many classes should i have.
    Should there be a new custom class for every component i use? Or should i make custom classes only for containers like JPanels?
    Do you know any patterns or conventions that could be of help... some tutorial of that sort that can be downloaded?
    Thank you.
    Borut.

    Check out the Model View Controller pattern for this look up MVC, and see what you get, this is where you prob want to go w/ this. Good luck
    harold smith iii
    [email protected]
    GO HOKIES

  • How to create two different implementation class for a Control

    Hi,
    I am a newbie to beehieve. I want to know that is it possible to create two different 'Impl' classes for a Control. If yes then how do we instantiate them ? How can we chain them (something like calling one 'Impl' from the other one? Thanks in Advance!!!
    Regards,
    Abhishek

    You are sure you are in the right forum?
    This is the JDeveloper and ADF forum...
    Timo

  • Error while mapping a Java class for a Search Dialog Box component

    Hi,
    Scenario : There is PAR which I have developed for the sorting options for a Search Component set to be used in Km Search Iview.
                   I have copied this PAR from a similiar search functionality and customised the same.
    Problem: When I deploy the PAR and then map this class for the sort options while creating a New Search Dialog box :
    I get the following "Class not found error" ... Please can you let me know what could be the problem.
    Any help would be appreciated here as I have tried all the possibilities to solve the problem.
    Regards,
    Vaishali.

    I modified the xml file as described in the forum.But the error persists.
    One interesting thing is:
    When I create model after restarting the NDS,I get the following error:
    org.eclipse.swt.SWTException: Failed to execute runnable <i>(java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "620.0.1237" but required at least version "620.0.1374".)</i>
    I get the NoClassDef found error next time onwards,
    Where do I get the 620.0.1374 version of librfc?
    thanx.
    Bhupesh

  • Best Practice for WSDL Generate Proxy Class for Web Service with Two Versions

    Dear All
    Thank you in advance for you help.
    I would like to generate proxy classes for same function but with two versions.
    Old version web service (v23.2) is used for stable modules in a project which is not going to modify.
    However, enhancement is added in new version web service (v24) and is going to use in any future modules.
    For example,
    wsdl.exe -o="TestProxy.cs" -l:CS -n:Test -sharetypes https://community.workday.com/custom/developer/API/Notification/v23.2/Notification.wsdl https://community.workday.com/custom/developer/API/Notification/v24.0/Notification.wsdl
    It generates similar classes with an '1' added at the end of the class name.
    ublic partial class Event_TargetObjectType {
    private Event_TargetObjectIDType[] idField;
    public partial class Event_TargetObjectType1 {
    private Event_TargetObjectIDType1[] idField; ...}
    Since the function inside some class is the same, is it possible for WSDL.exe to generate proxy classes automatically that if the class is the same, then generate one class only (sameFunction())  but if it detects the class is different, then add '1'
    to the end of class name (differentFunction() and differentFunction1())
    i.e.
    public class sameFunction()
    public class differentFunction()
    private int a;}
    public class differentFunction1()
    { private int b;
    Best Regards
    mintssoul

    Hi  mintssoul,
      As per this case, I have shared corresponding details below :
    1.As far as I know, WCF doesn’t support method overloading directly
    2.Because WSDL doesn’t support method overloading (not OOPs).
    3.WCF generates WSDL which specifies the location of the service and the operation or methods the service exposes.
    4.WCF use Document/Literal WSDL Style : Microsoft proposed this standard where the soap body element will contain the web method name.
    5.By default all the WCF services conform to the document literal standard where the soap body should include the method name.
    6.but you can differ the method in the same manually by using Name attribute like below 
    For example:
        [OperationContract(Name="Integers")]
        int Display(int a,int b)
        [OperationContract(Name="Doubles")]
    double Display(double a,double b)
    7. Or I suggest you that can use svcutil to map multiple namespaces for generating wcf service proxies .
        for more information about this, refer here :
    http://stackoverflow.com/questions/1103686/use-svcutil-to-map-multiple-namespaces-for-generating-wcf-service-proxies

  • One pricing condition for BOM and other for individual component

    Hello SAP gurus,
    We have two pricing condition types created and assigned in the pricing procedure which has been created with reference to PR00 and condition records are maintained for both the condition types.
    But, we want only one pricing condition type to be triggered in the sales order depending on the usage of material in the sales order. As we are selling the same material individually and as well as a component in a bundle ( BOM).
    i.e, when one pricing condition for BOM component and other for individual component
    What are the configuration steps to be taken care to get this scenario?
    Thanks in advance.
    Regards,
    KB
    Edited by: K.byla on Jan 21, 2010 1:20 PM

    Hi Sagar,
    Thanks for your response.
    Yes, we are maintaining only one material. The same material is used to sell individually and also in a BOM.
    As i have mentioned earlier, whenever the material is sold individually it should pick condition type say 'YR00' and when the same material is sold as a bundle ( BOM) , it should pick condition type " YR01" in same the pricing procedure.
    For both the condition types, the condition records are maintained.
    To give the scenario details,
    A material "X" is sold individually as a single component and the same material is also used for selling bundled with other material "Y" and the bundled material as "Z"
    means, Z=X+Y
    Pricing procedure used is say ZRA000 which contains currently the price cond type YR00.
    Now for the bundle (BOM) involvement i want to use the same pricing pricing proc. and add the new cond YR01 in it so that the system will pick the cond.type YR00 when the material is sold individually and YR01 is taken as the price when the material is sold as a bundle against the item X.
    Need to know the steps for this scenario and do i need to maintain a specific requirement ? please suggest.
    BR,
    KB

Maybe you are looking for