A question on Grids

Hi, I hope you can help me with this.
I would like to construct a grid using Swing, which will form the base area for a cellular automation. Therefore, I need to be able to retain information on each cell of the grid.
Any idea on how to do this?
Thanks in advance.
PW

Hi,
Hi, I hope you can help me with this.
I would like to construct a grid using Swing, which
will form the base area for a cellular automation.
Therefore, I need to be able to retain information on
each cell of the grid.
Any idea on how to do this?
Thanks in advance.
PWAre you talking about cellular automaton, as in "Conway's Life"?
If that's the case, don't use JTable. It's for displaying tabular data. I would recommend writing a custom JPanel subclass that paints the grid and the cells.
Here's a start on the painting part. Running this application will bring up a frame with a grid on it. A single cell will be painted in yellow (top left) and it will change every half-second.
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class CellPanel extends JPanel {
    boolean first = true;
    Timer timer = new Timer(500, new ActionListener() {
        public void actionPerformed(ActionEvent ae) {
            calculateNextStage();
            repaint();
    public CellPanel() {
        setBackground(Color.WHITE);
    private void calculateNextStage() {
        first = !first;
    public void start() {
        timer.start();
    public void stop() {
        timer.stop();
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        for (int i = 20; i < getWidth(); i += 20) {
            g.drawLine(i, 0, i, getHeight());
        for (int i = 20; i < getHeight(); i += 20) {
            g.drawLine(0, i, getWidth(), i);
        g.setColor(Color.YELLOW);
        if (first) {
            g.fillRect(0, 0, 20, 20);
        } else {
            g.fillRect(21, 21, 19, 19);
    public Dimension getPreferredSize() {
        return new Dimension(400, 400);
    public static void main(String[] args) {
        JFrame f = new JFrame("CellPanel");
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        CellPanel cp = new CellPanel();
        f.setContentPane(cp);
        f.setResizable(false);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setVisible(true);
        cp.start();
}Hope this helps :)
Shannon Hickey (Swing Team)

Similar Messages

  • Question: Does Grid Control monitor Hyperion products?

    Question: Does Grid Control monitor Hyperion products? If yes, can you direct me to the proper notes or documentation.

    user814333 wrote:
    Question: Does Grid Control monitor Hyperion products? If yes, can you direct me to the proper notes or documentation.Yes ..
    Please check :
    http://www.oracle.com/technetwork/middleware/bi-foundation/sys9-oem-integration-1-129287.pdf
    Regards
    Rajesh

  • Question about Grid Control Agents on a Veritas Cluster (or any cluster)

    Hi, I'm seeking advice on how to setup Grid Control agents on a Veritas Cluster.
    My cluster is made up of two Sun M4000 servers running Solaris 10 x64 (node1 and node2), and 8 virtual hosts setup to fail between the nodes. Each of these virtual hosts has several mount points from a SAN, and contain Oracle 9 and 10 homes as well as databases. The versions are 9.2.0.8 and 10.2.0.3.
    I have a full grid control agent install on each node to mount points that don't fail over to the other nodes. These agents monitor the nodes themselves.
    Now for my question, is it better to do full intalls of the grid agent in each virtual host or to use the "emctl deploy agent" from the full installs already on node1 and node2 to the virtual hosts? Or is there some other, better way to do this.
    Either method results in 9 grid control agents on a node if all the virtual hosts are on that box. I've experimented with both agent deploys and installs a bit and found that the cpu usage goes though the roof with that many agents on one server. Maybe I don't have them configured correctly, but every now and then they spike cpu usage to 100%, and these servers have 8, dual core processors in them with 32GB of RAM.
    Thanks for any tips!
    Currently, my setup looks something like this, if it helps:
    ORANODE1...........................................ORANODE2
    user: oracle..........................................user: oracle
    full agent install....................................full agent install
    VirtualHost1
    user: ora_user1
    Oracle 10G Home
    repository database
    OMS install
    full agent install
    VirtualHost2
    user: ora_user2
    Oracle 9i Home
    production database
    full agent install
    VirtualHost3
    user: ora_user3
    Oracle 9i Home
    production database
    full agent install
    VirtualHost4
    user: ora_user4
    Oracle10g Home
    production database
    full agent install
    VirtualHost5
    user: ora_user5
    Oracle10g Home
    production database
    full agent install
    VirtualHost6
    user ora_user6
    Oracle10G Home
    production database
    full agent install
    VirtualHost7
    user: ora_user7
    Oracle10G Home
    production database
    full agent install
    VirtualHost8
    User: ora_user8
    Oracle10G Home
    production database
    full agent install

    Will the agent 10.2.0.3 work with Grid Control 10.2.0.1
    Yes.

  • Few questions about GRID

    Hi there. Abap GRID is still mysterious for me I'd like to ask You few questions.
    In fieldcat I assign 'QUAN' datatype to column. Now it is displayed as: 1,000 3,000 and so on ...
    1) how can I determine to display values in that column as 1 3 ... (without ,000) ?
    2) how can I prevent from entering character-type values to that column? (for example '1000' is ok, but 'aaa' is not ok)

    hi,
    do this way to prevent comma appearance in the output  ...
    write it_output-field to it_output_final-field NO-GROUPING.
    Regards,
    Santosh

  • Question re: Grid Infrastructure 11.2.0.3 on IBM Power7+ server - IBM HACMP

    My company is preparing to create a new Oracle RAC cluster (11gR2) on IBM Power7 hardware running AIX (either 6.1 or 7.1, not sure yet). We currently have 2 11gR2 clusters running on older hardware.
    I am being asked by IBM and our AIX sys admin about using IBM's HACMP software to cluster the hardware at the OS level. I have researched the certification matrix on MOS, and have found that we CAN do this. But I am being asked if we SHOULD do this.
    Any links to Oracle documentation and/or MOS articles on this topic would be appreciated. I have never used HACMP in any of our past clusters, and would like to avoid the additional complexity. But I need to be able to "prove" my case.
    Any and all information based on forum users' experiences will be greatly appreciated. Thank you in advance for your assistance with this question/decision.
    Edited by: CowTown_dba on May 6, 2013 12:38 PM

    Hi,
    When you say cluster the hardware...what exactly does that mean? What hardware?
    When using RAC on AIX with ASM, CRS will manage all of your resources. HACMP is not required and even if you did install it, then would it manage?
    CRS will manage your scan, scan vip, vip and the storage will be shared on ASM. So the question remains as to what will HACMP manage, if you wish to install it?
    AIX: Top Things to DO NOW to Stabilize 11gR2 GI/RAC Cluster [ID 1427855.1]
    RAC and Oracle Clusterware Best Practices and Starter Kit (AIX) [ID 811293.1]
    If not using HACMP then HACMP filesets must not be installed.

  • Questions about grid

    I have a grid what is binded to a query. I want to see the grid group by itemcode (that is why I set the CollapseLevel = 1, where 1 is the column item code). But, in the grid id' like to set in the column quatity and the row on which it collapse the grid (the row with the itemcode) the sum of quatities in the expanded list. How can I do that? (just like in Reporting, Inventory, Inventory Posting List where i have the name of the item above the detailed list of documents).
    And also I'd like to know if I can get the position of a column of a grid in a form and it's properties (like width).

    The details you would like to set on the 'collapsed row' is unfortunately not possible as far as i know... This row is maintained by SBO and functions only as a group header and cannot be modified. (if someone knows how anyway, please report!)
    I think that if you have the grid, you can ask for its 'columns' list and then find the column you will need. You will get a 'gridcolumn' object or so. Check the SDK help: 'grid/gridcolumn/edittextcolumn/etc'

  • Question about Grid Control Installation

    Hello,
    I have two instances of 12i VISION apps with rdbms database 11i running on two different linux systems. I wanted to install 11g grid control to get familiar with the utility.
    Do I need to do the install on one of these linux machines or can I install it on a windows client?
    I need some help please.
    A/A

    Hello,
    I would suggest install grid control on separate server from rdbms, apps or even client machine
    Cheers

  • Architecture Question...brain teasing !

    Hi,
    I have a architecture question in grid control. So far Oracle Support hasnt been able to figure out.
    I have two management servers M1 and M2.
    two VIP's(Virtual IP's) V1 and V2
    two Agents A1 and A2
    the scenerio
    M1 ----> M2
    | |
    V1 V2
    | |
    A1 A2
    Repository at M1 is configured as Primary and sends archive logs to M2. On the failover, I have it setup to make M2 as primary repository and all works well !
    Under normal conditions, A1 talks to M1 thru V1 and A2 talks to M2 thru V2. No problem so far !
    If M1 dies, and V1 forwards A1 to M2 or
    if M2 dies, V2 forwards A2 to M1
    How woudl this work.
    I think (havent tried it yet) but what if i configure the oms'es with same username and registration passwords and copy all the wallets from M1 to M2
    and A1 to A2 and just change V1 to V2. Would this work ????
    please advice!!

    SLB is not an option for us here !
    Can we just repoint all A1 to M2 using DNS CNAME change ??

  • Is Grid Control to ever be certified on OEL  6?

    The title said it all really.
    I would like a response from Oracle - I even opened an SR on this and they instructed me to put the question here.
    Thanks

    Bazza wrote:
    That is not what I asked.
    I know it is not currently certified.
    The question is Grid control to ever be certified on OEL 6."ever" is a long time.
    One would expect that oracle will, at some time, certify oracle's database and supporting products to run on oracle's operating system. One would NOT expect them to pre-announce a date.

  • Web Design: Grids, RWD

    Hello!
    I have a few questions about grids in the design process:
    When I design a website for a target group, which has a minimum screen size of 1280 x 80 Px, wouldn't it make more sense to design the website a little bit more wider instead of using the 960 grid?
    In addition to the website there are also a mobile version as well as an app planned - therefore, it is necessary to design the website responsive?
    Therefore it's the designer's choice to set the width of a website - it just should fit for the targetgroup?
    It is right, that the 960 grid is used so often because it fits for almost everything?
    I would appreciate if you could help me with my issue.
    Thank you very much!

    It's not that simple.  Mobile & tablet devices have different requirements.  You can't use the same layout and amount of content in all devices anymore.   
    An average desktop can be anything from 1024px wide to an ultra wide TV screen.  Which viewport widths you design for depend on your target audience and what kinds of equipment they are using.
    Read these articles:
    Responsive Web Design
    http://coding.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/
    Device Agnostic Approach
    http://coding.smashingmagazine.com/2012/03/22/device-agnostic-approach-to-responsive-web-d esign/
    Responsive menus for Touch Screens
    Placement is key.
    http://www.lukew.com/ff/entry.asp?1649
    Nancy O.

  • How to get an account with an IsICP -"R" attribute calculated in the HFM Rule file

    Till recently everything was going fine with the calculations in our HFM setup ( Version 4.1)
    We have say around 8 Expense accounts which roll up into a Parent account say ALL446 which finally rolls up into Operating Expenses.
    Operating Expenses
      |__ parent account
          |_INVALO
           |_ALL446
              |__222446
              |__242446
    And we have a calculation in the rule file as below
    HS.EXP "A#BE FIXED COST = A#Operating Expenses +A#SGA - A#BE VC OP F10"
    This was calculating correctly till we did the below change
    Added IsICP attribute to couple of accounts say 222446 and 242446 ( in the above example) in the metadata which finally rolls up into Operating Expense.
    Note: we did not add any Plug account attribute to the accounts
    Now the problem what we have in hand is -> Fixed Cost is not calculating correctly.- It happens that the two accounts for which we added the IsICP are not showing up in the calculation and the data in those two accounts are not adding up in Fixed Cost.
    POV in GRID/Excel -> actual,2013,periodic,<Entity Currency>, ICP Top, AllCustom1, AllCustom2, AllCustom3, None( for custom4)
    But when we retrieve Operating Expenses in Excel - it is showing the correct amount, even in the grid - but looks like when the rule tries to calculate Fixed Expenses using the above rule - these accounts are not adding up in the Operating expenses.
    I tried the formula ( to check what number is coming into Fixed cost ) - the result is zero - But in the grid/excel I see amount for acct2. Same POV as above
    HS.EXP "A#BE FIXED COST = A#222446"
    and if I add & Tops to the account like below ( getting some weird number instead of what is there in acct2)
    HS.EXP "A#BE FIXED COST = A#222446" & Tops
    Questions:
    1) Where exactly I am going wrong ?
    2) Is it MANDATORY to have a Plugaccount attribute when we have IsICP turned to "R" ?
    3) What will happen if we do not have a Plugaccount for the IsICP account ?
    4) How to correct the formula to make sure I get the number in the acct2 into Fixed Cost??
    5) Do we need to have the IsICP turned on to the immediate parent of the account having IsICP and the Top parents of the account too??
    6) Is it possible to get the exact number what we have in 222446 into BE Fixed Cost account via Rule?- why I am not getting it
    Notes:
    BE Fixed Cost-> account type -"Expense", IsCalculated - yes, IsConsolidated - yes, IsICP- N, Custom1TopMember - AllFunctions, Custom3TopMember- AllCustom3, enabled allcustom1,2,3,4aggregations
    Operating Expenses->"Expense", IsCalculated - No, IsConsolidated - yes, IsICP- N, Custom1TopMember - AllFunctions, Custom3TopMember- AllCustom3, enabled allcustom1,2,3,4aggregations
    INVALO ->"Expense", IsCalculated - No, IsConsolidated - yes, IsICP- N, Custom1TopMember -none, Custom3TopMember- none,
    enabled allcustom1,2,3,4aggregations
    Problematic account 222446 -> "Expense", IsCalculated - No, IsConsolidated - yes, IsICP- R, Custom1TopMember - Operations, Custom3TopMember- AllCustom3, enabled allcustom1,2,3,4aggregations
    The Entity on which I am trying to get the data( mentioning wherever I have attributes for this entity)
    DefCurrency - DEM, Allowadjs- enabled, IsICP - enabled, Userdefined 2 - financial, - SecurityasPartner attribute - is not selected through out the applicaiton.
    Variable
    Tops = ".I#[ICP Top].C1#AllCustom1.C2#AllCustom2.C3#AllCustom3.C4#[None]"
    tried attaching the attachments ( but service is unavailable)
    Waiting for all of your valuable suggestions..

    1) why was I not getting the formula right when I use & Tops
    I'm assuming that BE Fixed Cost has N for IsICP, in that case you can not write to invalid intersections as it would attempt to use the same ICP information
    2) Is it MANDATORY to have a Plugaccount attribute when we have IsICP turned to "R" ?
    No
    3) What will happen if we do not have a Plugaccount for the IsICP account ?
    It will not run eliminations
    4) Do we need to have the IsICP turned on to the immediate parent of the account having IsICP and the Top parents of the account too??
    If you want it to rollup, yes you would need that.  We have all Parent accounts as isICP set to Y and top member to ICP Entities so that they roll up
    5) which will have priority the rule or the Grid where we have the calculated member like the BE Fixed Cost - because in the grid I had icptop, allcustom1,2 3 and when had & Tops to the account - I got some weird numbers...
    I'm not following the question here, grids are just really a display mechanism, rules will handle all of the calculations.

  • DBConsole wont start

    Note: this is a DBConsole question not Grid Control but cannot find a more suitable forum.
    I have had a few issues with OEM on 10.2.0.4 Standard edition on Windows 2003. Scheduled jobs which ran fine in test were not running in Production. I decided to restart the OracleDBConsole but it would not restart. I then tried to recreate the repository using: emca -config dbcontrol db -repos recreate. All went fine until the final step:
    6/04/2011 11:35:14 oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    After 10 mins this was logged: SEVERE: Error starting Database Control
    6/04/2011 11:45:14 oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
    at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)
    at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)
    at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
    at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
    at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
    at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
    at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)
    Any ideas what the issue could be here? Have successfully rebuilt the repository in the past in test and production.
    Thanks
    Madre

    Looks like there are no errors in the first part of the log, this is the final part:
    11/04/2011 09:54:12 oracle.sysman.emcp.util.DBControlUtil secureDBConsole
    INFO: Database Control secured successfully.
    11/04/2011 09:54:12 oracle.sysman.emcp.EMDBPostConfig performConfiguration
    CONFIG: Securing Database Control completed successfully .
    11/04/2011 09:54:12 oracle.sysman.emcp.ParamsManager getParam
    CONFIG: No value was set for the parameter ORACLE_HOSTNAME.
    11/04/2011 09:54:12 oracle.sysman.emcp.util.DBControlUtil startOMS
    INFO: Starting Database Control (this may take a while) ...
    11/04/2011 09:54:12 oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: cmdType: 0
    11/04/2011 09:54:12 oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Starting Windows service...OracleDBConsolerm4p
    11/04/2011 09:54:12 oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Waiting for service 'OracleDBConsolerm4p' to fully start
    And this is the end of the log file after ten minutes of "Waiting for service... to fully start..."
    CONFIG: Waiting for service 'OracleDBConsolerm4p' to fully start
    11/04/2011 10:04:02 oracle.sysman.emcp.util.PlatformInterface serviceCommand
    CONFIG: Initialization failure for service during start
    11/04/2011 10:04:02 oracle.sysman.emcp.EMConfig perform
    SEVERE: Error starting Database Control
    Refer to the log file at C:\oracle\product\10.2.0\db_2\cfgtoollogs\emca\rm4p\emca_2011-04-11_09-48-40-AM.log for more details.
    11/04/2011 10:04:02 oracle.sysman.emcp.EMConfig perform
    CONFIG: Stack Trace:
    oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control
         at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)
         at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)
         at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)
         at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)
         at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)
         at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)
         at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)
         at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)
    so basically looks like the windows service thats failing...
    Any suggestions
    thanks
    Madre

  • Template vs notification rules

    Hello
    couple of questions about grid 11g
    1 what happens when you apply a template to target ? does it overwrite exisitng out of box notification?
    2 are there any dependencies between monitroing template/ notificaiton rules? can i create rule to send out notificaiton for a codition(metric) that is not in the template?
    thanks

    rpatti wrote:
    1. Applying a template changes the thresholds and drives when the system raise a critical or warning alert. The notification rules are independent of templates and drive what action we take when a critical or warning alert comes in. I am not quite sure what you mean by "overwrite existing out of box notifications" - but in general, templates and notification rules are related but independent as described above.
    2. See above. You can always create a rule to send notifications for alerts on any metric. If the alert triggers - it will do what's requested.
    Of course, you need to set thresholds appropriately on the target to raise a warning or critical alert - either by directly changing thresholds or using a template.
    Hope that helps.when I create notification I see all metrics even those which I haven't configured, why oracle displays those and doesn't hide them? a little bit curious because its misleading

  • Setting up a metrics template

    hi,
    sorry but another question regarding grid control ( you can probably guess that I am quite new to it).
    I want to set up a metric monitoring template, I seemed to think I had this achieved but it seems to have taken all metrics and not just the 2 I chose.
    any help is appreciated.
    rgds
    alan

    In oem alerts click on the details - its a binoculars icon. It will show you which rule was used to send you the alert. Listener alerts are different metrics the databases. So are you sure you turned that off - if thats really what you want to do.
    You can just stop the emails for certain metrics and still let oem catch them. See the preferences->rules tab.

  • Nested Internal tables with cl_gui_alv_grid - not displaying records

    Hi,
    I wrote a program using nested internal tables with cl_gui_alv_grid class
    At runtime, when I select dropdown on one of the cells (RESWK - driver to the nested table), it does not bring the related record and display it
    Does cl_gu_alv_grid support nested internal tables?
    Or which class to use
    Appreciate reply at the latest
    Thanks
    Rajeev
    Edited by: Thomas Zloch on Feb 7, 2011 4:11 PM - priority reduced

    Hi Rajeev,
    Maybe checking out this documnetation will answer your question:
    [ALV Grid Control (BC-SRV-ALV)|http://help.sap.com/saphelp_erp2004/helpdata/EN/bf/3bd1369f2d280ee10000009b38f889/frameset.htm]
    To my knowledge ALV does not support deep structures.
    Kind regards,
    Robert

Maybe you are looking for

  • Opening a Crystal Report in B1 8.8 in a User Defined Form representing UDO

    Hi Experts, Is it possible to open a Crystal Report from a User Defined Form representing my UDO? I had developed a 'Vendor Quotation' UDO and its  User Defined Form I wanted to show the report while clicking the Preview menu in SAP B1 8.8 toolbar. I

  • Video playback stops and starts

    I've never had this problem before but since I wiped my 5th Gen (late 2006) iPod Video and put new content on it the video playback keeps freezing for a second and then continuing. Most of the time the audio keeps going but sometimes they both stop a

  • HT4314 I need to report an app for age rating, how do I do that?

    I put an age restriction on my sons phone and I came across an app that says its for 12 and over but you can look up nudity and ****. This app needs to be re-rated and I feel like the apple store needs to pay better attention to this or figure out a

  • Newbie trying to combine multiple clips on one video file for iDVD

    I just bought my Mac and and starting to make home videos. I have 20 .mov clips I imported from my HDD camcorder into the events section on Imovie 08. I could not find a way to combine these clips on Imovie 08 into one large clip. I imported these mo

  • Another Snow Leopard question.

    I currently run 10.5.6 on my iMac, having been deterred from upgrading by some of the comments about 10.5.7 and further deterred by the reaction to 10.5.8. I will buy Snow Leopard but I'm wondering if it will require me to install 10.5.7 and 8 before