Adding noSwing component into Swing JPanel.

Helo.
I was wondering is there any chance to add button created using SWT library to Swing JPanel? Mamy someone did do this before?
Thanks for any clue.
Regards

This begs the question: why on earth would you want to do this?
I imagine it's possible through some monumental JNI coding, but the chances of it working well are slight and of breaking often are great. So again, why?

Similar Messages

  • Problem adding a component into a JFrame

    public DVD_VIDEO_CLUB() {
    mainFrame = new JFrame("DVD-VIDEO CLUB");
    mainFrame.setExtendedState(Frame.MAXIMIZED_BOTH);
    aDesktopPane = new JDesktopPane();
    aDesktopPane.setBackground(Color.LIGHT_GRAY);
    aDesktopPane.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    mainFrame.setContentPane(aDesktopPane);
    mainFrame.getContentPane().add(internalPanels.MainInternalPanel());
    atoolkit = Toolkit.getDefaultToolkit();
    mainFrame.addKeyListener(new MainFrameKeyListener());
    mainFrame.addWindowListener(new FrameListener());
    mainFrame.setIconImage(createFeatures.getImage());
    mainFrame.setSize(atoolkit.getScreenSize());
    mainFrame.setJMenuBar(aMenubar.MakeMenuBar(new ItemActListener()));
    mainFrame.setVisible(true);
    mainFrame.setDefaultCloseOperation(3);
    }//end constructor
    The argument internalPanels.MainInternalPanel() is a class (internalPanels) which have various jpanels
    that i want to display under certain events.
    But i don't know why the command
    mainFrame.getContentPane().add(internalPanels.MainInternalPanel());
    doesn't work? I look into the java tutorial and i have read that in order to add a component you have to
    call the command
    jframe.getContentPane().add(component);
    any help is appreciated!

    my problem isn't how to add internalframes but how to add a jpanel.Did you set the size of the JPanel?
    import java.awt.*;
    import javax.swing.*;
    public class Example {
        public static void main(String[] args) {
            JFrame mainFrame = new JFrame("DVD-VIDEO CLUB");
            mainFrame.setExtendedState(Frame.MAXIMIZED_BOTH);
            JDesktopPane aDesktopPane = new JDesktopPane();
            mainFrame.setContentPane(aDesktopPane);
            JPanel p = new JPanel();
            p.add(new JLabel("here is your panel"));
            p.setLocation(100, 200); //as you like
            p.setSize(p.getPreferredSize()); //this may be what you are missing
            p.setVisible(true);
            mainFrame.getContentPane().add(p);
            mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            mainFrame.setVisible(true);
    also i have tried not write 3 but JFrame.EXIT_ON_CLOSE but i was getting an error exception continiously.Do you mean a syntax error? That constant was introduced in 1.3 -- what version are you using?

  • Adding Dynamically adding a component to a JPanel and make it diaplay

    Hi,
    I am having two panels in a container, one is in the left side and the another is in the right side.The left side panel contains some buttons.If the user clicks on any buttons the corresponding component is to be loaded to the right side panel and displayed.This should be done at runtime.

    Hi,
    I will tell you the design & senario, my screen has two panels one is in leftside & another is in rightside of the screen.while opening the main screen I am having 3 buttons on the leftside panel and none in the rightside panel.If i clicked the 1st button 2 labels,2 textfields and 2 buttons should be displayed on the rightside panel.I am having these components in a separate class file which extends a JPanel.Only in the runtime i want to add this class file(as component) to the rightside panel in the main screen.how is it possible? reply me

  • How to embed swing component into javaFX ?

    Maybe I missed sth, but can someone explain us how can we embed swing component into javaFX 2.0 ?
    This was previously handled with javaFX "srcipt", why can't we do it anymore ?
    As far as the work to migrate from 1.3 to 2.0 is hard and huge, why do fx2.0 do not offer such feature anymore ? :(
    I know that ThingFx project try to cope with, but the current code doesn't match with my needs.
    Thanks for help,
    Edited by: tibO on 23 nov. 2011 14:35

    I know this post is old and the original authors might not even ben active; but it essentiall gets to the heart of what I'm trying to.
    I have a JDialogBox. In it I have a panel (which I have to change to a JScrollPane). Inside the JPanel I have a JLabel and a JTextArea.
    I was told to; make it scrollable in the event that there is too much info for the JDialogBox and to add HTML formatting (simple stuff like bold and colors.
    1) The JScrollBar doesn't seem to produce the scroll side bars.
    2) I must not be implementing the JEditorPane correctly. I just substituted JEditorPane for JTextArea in my code and it returned a type converstion error. Is JEditorPane even the correct object to use? Should I be using JTextPane?
    The reason I can't do this on a JLabel by JLabel basis is because I don't know how many labels I will need at each runtime. And I also have to have a swingtimer on it. I could create an array and loop around it to create the JLabels. But it seems a waste of commuting cycles. This is no good?

  • [svn:cairngorm3:] 15920: Adding the use of Spark component into ModuleC to add the scenario where a Module must be able to get its default spark skin  (currently this is failing due to a bug in the Module Lib)

    Revision: 15920
    Revision: 15920
    Author:   [email protected]
    Date:     2010-05-06 02:11:21 -0700 (Thu, 06 May 2010)
    Log Message:
    Adding the use of Spark component into ModuleC to add the scenario where a Module must be able to get its default spark skin (currently this is failing due to a bug in the Module Lib)
    Modified Paths:
        cairngorm3/trunk/libraries/ModuleTest/src/example/moduleC/ModuleC.mxml

    As the server.xml is big enough, I took the minimum portion of it. Hope u can proceed with it.
    <!-- Tomcat Root Context -->
    <Context path="" docBase="ROOT" debug="0"/>
    <!-- New contexts -->
    <Context path="/xyz" docBase="pathTo_xyz" debug="0" crossContext="true"/>
    <Context path="/pqr" docBase="pathTo_pqr" debug="0" crossContext="true"/>
    <!-- Tomcat Examples Context -->
    <Context path="/examples" docBase="examples" debug="0"
    reloadable="true" crossContext="true">
    You should also provide a WEB-INF folder under pqr or xyz folder.
    You should also provide a web.xml file under each WEB-INF folder.
    The minimal web.xml is
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/j2ee/dtd/web-app_2_3.dtd">
    <web-app>
    </web-app>
    That's it. Try it out. Hope it is OK.
    Hafizur Rahman
    SCJP

  • [svn] 3035: * Added HTTPMultiService component - refactored the guts of HTTPService into a new

    Revision: 3035
    Author: [email protected]
    Date: 2008-08-28 23:18:11 -0700 (Thu, 28 Aug 2008)
    Log Message:
    * Added HTTPMultiService component - refactored the guts of HTTPService into a new
    class AbstractOperation which HTTPService now wraps.
    * Moved concurrency and showBusyCursor classes up to the mx.rpc level from mx.rpc.mxml.
    Partly this improves consistency and partly because it is awkward to implement them
    with the wrapping design in the subclass. This does introduce a new dependency on
    CursorManager in mx.rpc.HTTPService, though I think that should turn into a "runtime binding"
    so we remove the compile time binding altogether.
    * Added managers, operationManager, resultType, resultElementType, properties to the
    AbstractService and AbstractInvoker classes. These are used to improve the metadata information
    on these operations for better tooling in the future, and to allow management services to
    tie into the service infrastructure.
    * AsyncToken gets a default parameter for its constructor so it can be used in MXML.
    * Moved endpoint property up from the MXML to the regular mx.rpc version to improve consistency
    The blazeds RPC tests passed unfortunately I had problems getting the RPC tests in the sdk branch
    to build and run so let me know if you see any problems on those.
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/rpc/manifest.xml
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as
    Added Paths:
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as
    flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as

    the "main" class contains the following relevant codetip: 'relevant' code is rarely read, particularly if it's more than 5 lines.
    about 75% of posts with relevant code, the problem is elsewhere.
    create a new program with only those parts related to the problem
    e.g. if your main program has a menu, and there's no problem with that,
    don't include the menu in the new program. If your program has button,
    and no problems, don't add them in. if just the tree, all you need is a frame and a tree.
    when you do this, make sure it compile and runs OK (but displaying the problem behavior),
    then post all of it here, along with the steps to reproduce the problem.
    doing it this way should drastically reduces the lines of code, therefore greatly
    improving your chances of a solution.

  • Adding and displaying a new JPanel -- not working as expected

    I'm starting my own new thread that is based on a problem discussed in another person's thread that can be found here in the New to Java forum titled "ActionListener:
    http://forum.java.sun.com/thread.jspa?threadID=5207301
    What I want to do: press a button which adds a new panel into another panel (the parentPane), and display the changes. The Actionlistener-derived class (AddPaneAction) for the button is in it's own file (it's not an internal class), and I pass a reference to the parentPane in the AddPaneAction's constructor as a parameter argument.
    What works: After the button is clicked the AddPaneAction's actionPerformed method is called without problem.
    What doesn't work: The new JPanel (called bluePanel) is not displayed as I thought it would be after I call
            parentPane.revalidate();  // this doesn't work
            parentPane.repaint(); 
    What also doesn't work: So I obtained a reference to the main app's JFrame (I called it myFrame) by recursively calling component.getParent( ), no problem there, and then tried (and failed to show the bluePanel with) this:
            myFrame.invalidate();  // I tried this with and without calling this method here
            myFrame.validate();  // I tried this with and without calling this method here
            myFrame.repaint();
    What finally works but confuses me: I got it to work but only after calling this:
            myFrame.pack(); 
            myFrame.repaint();But I didn't think that I needed to call pack to display the panel. So, what am I doing wrong? Why are my expectations not correct? Here's my complete code/SSCCE below. Many thanks in advance.
    Pete
    The ParentPane class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ParentPane extends JPanel
        private JButton addPaneBtn = new JButton("Add new Pane");
        public ParentPane()
            super();
            setLayout(new BorderLayout());
            setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            setBackground(Color.yellow);
            JPanel northPane = new JPanel();
            northPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            northPane.setBackground(Color.yellow);
            northPane.add(addPaneBtn);
            add(northPane, BorderLayout.NORTH);
            // add our actionlistener object and pass it a reference
            // to the main class which happens to be a JPanel (this)
            addPaneBtn.addActionListener(new AddPaneAction(this));
        public static void main(String[] args)
            javax.swing.SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShowGUI();
        private static void createAndShowGUI()
            JFrame frame = new JFrame("test add panel");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().add(new ParentPane());
            frame.pack();
            frame.setVisible(true);
    } the AddPaneAction class:
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.SwingConstants;
    public class AddPaneAction implements ActionListener
        private JPanel parentPane;
        private JFrame myFrame;
        public AddPaneAction(JPanel parentPane)
            this.parentPane = parentPane;
         * recursively get the JFrame that holds the parentPane panel.
        private JFrame getJFrame(Component comp)
            Component parentComponent = comp.getParent();
            if (parentComponent instanceof JFrame)
                return (JFrame)parentComponent;
            else
                return getJFrame(parentComponent);
        public void actionPerformed(ActionEvent arg0)
            JPanel bluePanel = new JPanel(new BorderLayout());
            bluePanel.setBackground(Color.blue);
            bluePanel.setPreferredSize(new Dimension(400, 300));
            JLabel myLabel = new JLabel("blue panel label");
            myLabel.setForeground(Color.LIGHT_GRAY);
            myLabel.setVerticalAlignment(SwingConstants.CENTER);
            myLabel.setHorizontalAlignment(SwingConstants.CENTER);
            bluePanel.add(myLabel, BorderLayout.CENTER);
            parentPane.add(bluePanel);
            myFrame = getJFrame(parentPane);
            //parentPane.revalidate();  // this doesn't work
            //parentPane.repaint(); 
            //myFrame.invalidate(); // and also this doesn't work
            //myFrame.validate();
            //myFrame.repaint();
            myFrame.pack();  // but this does!?
            myFrame.repaint();
    }

    For me (as it happens I'm using JDK 1.5.0_04) your code appears to work fine.
    It may be that we're seeing the same thing but interpreting it differently.
    1. When I run your application with your "working" code, and press the button then the JFrame resizes and the blue area appears.
    2. When I run your application with your "not working" code and press the button then the JFrame does not resize. If I manually resize it then the blue area is there.
    3. When I run your application with your "not working" code, resize it first and then press the button then the JFrame then the blue area is there.
    I interpret all of this as correct behaviour.
    Is this what you are seeing too?
    Are you expecting revalidate, repaint, invalidate or validate to resize your JFrame? I do not.
    As an aside, I do remember having problems with this kind of thing in earlier JVMs (e.g. various 1.2 and 1.3), but I haven't used it enough recently to know if your code would manifest one of the previous problems or not. Also I don't know if they've fixed any stuff in this area.

  • How to create new component in SWING?

    Hi,
    I created a suggestion box using JTextField and JList. It's working nicely. I would like to Standardize those component into single component. so that i can add whenever i need suggestion box in my project anywhere. Can anyone give me a suggestion to do this?
    - i want to create it like a normal components (JButton, JComboBox and etc). but it consist of two components.
    - i need to create it's own inbuilt listeners like (MouseListeners, KeyListeners). (i can extend the JTextField class and implement KeyListeners in it).
    - i like to add functionality like. (Whenever i type any character, then values for the corresponding characters are fetch from the DB and set into the Model).
    Am just thinking whether i need to paint a component and add some AncestorListener. or else to extends the existing component. Kindly suggest me for this thing. Thanks in advance.
    Regards,
    Mo

    Thanks for your reply WalterLaan. If i use JPanel and i add some components like JTextFeild and i set JList for its Listener. Then it'll works with in the added JPanel. Not in the JFrame.
    i can write Like...
    class MyPanel extends JPanel
    MyPanel()
    super();
    JTextFeild t = new JTextFeild();
    add(t);
    JList l = new JList(new String[]{"1,","2"});
    add(l);
    class frm
    public static void main(String arg[]){
    JFrame jf = new JFrame();
    MyPanel mpl = new MyPanel();
    mpl.setBounds(0,0,100,30);
    jf.add(mpl);
    So i can't able to see the added JList. Right???? How to i create a JList like a PopUp???
    Kindly Guide me to invent new component. Thanks in advance.
    by,
    MO

  • How to read URL parameters of one wdp component into other WDP component?

    Dear Experts,
    Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
    My requirement is i have one standard WDP component with 3 URL parameters and i needto
    read that URL parameters along with their values in my Z-WDP component.
    Thanks
    SK

    Hi Santosh,
    You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
    data: lt_parameter             type tihttpnvp,
             ls_parameter             type ihttpnvp.
    lo_api_controller ?= wd_this->wd_get_api( ).
       call method lo_api_controller->get_message_manager
         receiving
           message_manager = lo_message_manager.
       clear : ls_parameter.
       refresh : lt_parameter[].
    * Read all URL parameters
       wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
    if not lt_parameter[] is initial.
         clear : ls_parameter.
         read table lt_parameter into ls_parameter index 1.
         if ls_parameter-name = 'ACTION' and
            ls_parameter-value is initial.
           lv_flag = 'X'.
           clear : lo_msg.
           lo_msg = 'Action Parameter Missing in URL Link !'.
    *         report message
           call method lo_message_manager->report_error_message
             exporting
               message_text = lo_msg.
         else.
         endif.
    Best Regards
    Priyesh Shah

  • How to add 3 jpanels into 1principal jpanel

    Hi, I have a situation with some panels:
    there are 3 jpanels, each one has 3 jbuttons inside; and there is 1 jpanel that contains a JLabel with an image.
    My question is:
    How can I put into the jpanel ppal the 3 jpanels with button; and then this jpanel container put into the main jframe class?
    Regards

    study and learn the Swing layout managers. you can find a decent tutorial on this on the Sun tutorial site.

  • Removing select components from swing JPanel

    I have a JPanel that contains many different JLabels that move around to different parts of the JPanel. These components may end up occupying the same location in the JPanel.
    1. How do I determine which objects is the one visible? Is it the one most recently added to the JPanel?
    2. How do I selectively remove a certain component that may be in under one component and above 2 others...? This JLabel that I want to remove, does not have a specific name, instead it is indexed in an array.

    steeveesas wrote:
    I have a JPanel that contains many different JLabels that move around to different parts of the JPanel. These components may end up occupying the same location in the JPanel.
    1. How do I determine which objects is the one visible? Is it the one most recently added to the JPanel?I would guess that much depends on the layout manager (if any used) and how you are adding the components to the jpanel.
    2. How do I selectively remove a certain component that may be in under one component and above 2 others...? This JLabel that I want to remove, does not have a specific name, instead it is indexed in an array.call remove(component) on the JPanel followed by revalidate() and repaint().

  • Scrolling component into view programmatically without using javascript

    Hi,
    Is it possible to scroll an adf component into view programmatically without using javascript?
    I know of <af:scrollComponentIntoViewBehaviour> that can be added to a command component , but is there a way to do that programmatically in a bean?
    Problem with using javascript is its not guaranteed to work in different browsers.
    Regards,
    Rakesh.

    Hi John,
    Thanks for the reply.
    If i use the af:scrollComponentIntoViewBehavior, then i wont be able to achieve my desired functionality.
    In my use case, i want the id, of the component that needs to be scrolled into view, to be determined in the server listener of the button which is not happening.
    Code snippet in jspx page is as follows:
    <af:commandButton id="cb1" immediate="true">
    <af:clientListener method="clickButton" type="click"/>
    <af:serverListener type="customEvent"
    method="#{pageFlowScope.bean.doScroll }"/>
    <af:scrollComponentIntoViewBehavior id="#{pageFlowScope.bean.compId}/>
    </af:commandButton>
    And the java code for method doScroll is something like :
    public void doScroll (ClientEvent clientEvent)
    //logic to determine compId goes here
    compId = "id";
    So, the problem here is "compId" is set to some value when bean is loaded and the id in the af:scrollComponentIntoViewBehavior will be set to that value forever.
    I cant find any way of telling it to re-read the "compId" value, say after clicking the button. I can refresh the button in the server listener to update the compId .
    But the updated compId will come into picture from *next click*. This is because, after the button is clicked, "scroll" action happens first and then serverListener executes.
    Is there a way to change order of this execution like "execute server listener first and then do the scrolling thing" ?
    Regards,
    Rakesh.
    Edited by: 927925 on Jul 27, 2012 2:02 AM

  • How to replace a component in the JPanel?

    Hi,
    I want to replace a component in the JPanel. My panel has GridBagLayout.
    Thanks in advance.

    because my application demands me to use GridBagLayout.No it doesn't, that a choice you made. You are never forced to use a specific layout manager. In fact most layout problems are solved by using combinations of layout managers. You two main choices are:
    a) use a GridbagLayout for the main panel and then a CardLayout for the two components you want to sway, although it may look strange if the components are a different size as the preferred size of the panel will be the size of the largest component
    b) Simulate a card layout using:
    panel.remove(...)
    panel.add(...);
    panel.revalidate(...)

  • Problem showing the crystal report viewer in form after added the component on it

    Greetings
    I have a problem running a program. I created a form which I added the component Crystal Report Viewer perfecty but during program execution when I call that form my VS 2012 Ultimate show the following error:
    Translated:
    Failed to create the form. See Exception.InnerException for details. Error: An exception occurred in the type initializer for 'CrystalDecisions.Shared.SharedUtils'.
    Note: If I remove the component from the form. the applications runs fine when calling the form without the component CrystalReportViewer
    It is something related to my VS? o just that the actual version 13.0.9 is not yet compatible?

    Report.Show?
    How about you try:
    CrystalReportViewer1.ReportSource = <path to your report>
    Or:
    Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
    crReportDocument.Load(<path to your report>)
    CrystalReportViewer1.ReportSource = crReportDocument
    Or, if the report is added to the project:
    crReportDocument = New test
    CrystalReportViewer1.ReportSource = crReportDocument
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter
    Message was edited by: Ludek Uher

  • How can we acess the data of one component into othr component in webdynpo?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1)  which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the  component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi,
    Please post your query in forum Web Dynpro ABAP Forum, under Application server.
    You have to define the source component as in the used component in the target one to do that.
    after that you will be able to get data from that component.
    Regards,
    Vaibhav

Maybe you are looking for

  • Change GR based IV indicator in Me22n after GRN reverse

    Dear All, I have issue related to GR based IV. I created a PO with delivery cost. did GR wrt PO where Material account got debit and Gr/ir and freight clearing got credit. During MIRO user did not found any freight amount(i.e Clearing account). So th

  • Is there a way to edit songs in itunes?

    I am working on creating a dvd and am making slideshows of pictures from iphoto. I only want to use a portion of a song I have in itunes. Is there a way to edit the music? If so, how? Thanks

  • Urgent: problem in BEAN

    There is problem in accessing bean from jsp page.I am facing this exception java.lang.IllegalAccessError: tried to access method CDAC.peer.()V from class org.apache.jsp.jsp8_jsp .I declared peer class and all methods inside this class as public and i

  • Windows 7 driver needed?

    I purchased the HP Photosmart C4680 to be shared on a home wireless network from a Windows XP computer. The printer works fine on the computer on which it is installed. I also successfully added the printer to a laptop running XP and it prints fine.

  • Integrated Budget in controlling

    Dear Guys,                      My Client required integrated budget in Controlling. I will explain the scenario 1. They are preparing Sales Plan by Marketing People. 2. Based upon sales plan they verifying there capacity and requirement of material