Problem In Placing Components

hi this is anandkumar from india now i am working with Java studio creator 2 update 1. I am facing probelms with placing the components because when i place the components in the design view they look fine but when i will run that page the components width will be sometimes go small and there will be allignment problem between the compenents even though i have alligned all the components correctly in the design view. If any body helps me to come out of this problem i am really thankful to them.
Regards
Anandkumar

Hi Anand,
I too faced a similar issue. The work around I did was to place all my components in a[b] table and after that the look n feel in the Design View matched the same in my browser.
Hope this helps :)
Let me know, if your still facing any issues with positioning components.
Good Luck
Anil Mahadev
http://anilm001.myfreewebs.net/index2.php
Java Studio Enterprise and Creator User
Bangalore
INDIA

Similar Messages

  • Problems with Logical Components

    Hi All,
    I am having problems with Logical Components with our project. We are implemeents SAP HCM and we have defined a logical component Z_ERP for the ECC server. now when you look at the transaction from SOLAR02 it seems they also have a logical Component SAP Learning Solution that is assigned to them. what could be the cause of this???

    Hi Trevor,
    If you brought them in from the Business Process Repository, the logical component is going to be the default one. If you want to use your own, you need to replace the default one with yours.
    You can do this in SOLAR_PROJECT_ADMIN by going to the System Landscape tab > Systems tab > highlight the SAP Learning Solution logical component row > press F4 > replace it with Z_ERP.
    If for some reason SAP Learning Solution isn't listed as a logical component you may have to add it, you can also just go to SOLAR02 > Edit > Replace Log. Comp > Enter SAP Learning Solution in the top box and Z_ERP in the bottom one > click Save.
    regards,
    Jason

  • Problem with placing of properties file

    Hi all,
    Iam using a properties file.
    From a jsp, Iam reading the property file.....
    Its giving FileNotFoundException....
    I hope its problem with placing of my properties file...
    I placed the properties file in WEB-INF/classes..folder.....
    But still iam getting the FileNotFoundException...
    PLz tell me where exactly should I place my properties file...
    Thanks ....

    first rule of using a forum: read recent topics !
    http://forum.java.sun.com/thread.jspa?threadID=668488&tstart=0

  • Facing problem in placing portlets in Web Layout

    I am facing problem in placing portlets on Web layout page-
    1. I am getting some space between the regions. I want that my portlet should join adjacent only not even a single pixel gap should be there.
    2. In Web Layout, First region is the left most and after that subsequent region comes right to first region and one after other. But my second and third region's portlet are coming adjacent instead of third region's portlet coming under second region's portlet
    Please help...............

    The first issue is a bug/feature that has been changed in 3.0.8 (9iAS MR1) due out this week. In previous releases we added spacing arbitrarily. Now, you can define the spacing in the region properties.
    I don't understand issue number 2. Can you clarify the problem?

  • Problem in placing hibernate.cfg.xml

    Hi,
      I have written one ejb project with hibernate in my net weaver.Now i have a problem in placing hibernate.cfg.xml.so tell me where to place it .Give some examples related to that and some related links.

    Hi,
    you can place it into the root of the EJB project as your EJBs probably access Hibernate as persistence layer. In this case make sure that you pass the string "hibernate.cfg.xml" within the method invocation when retrieving a SessionFactory as follows:
    try
    Configuration cfg = new Configuration();
    sessionFactory = cfg.configure 
         ("hibernate.cfg.xml").buildSessionFactory();
    catch (Throwable ex)
    Otherwise the Configuration file may not be found by the application class loader due to different path syntax.
    For further information you can refer to this https://www.sdn.sap.com/irj/sdn/developerareas/java?rid=/webcontent/uuid/e081a4b6-0801-0010-7fa4-c3c7a0454815#hibernate [original link is broken] [original link is broken], although the hibernate.cfg.xml file is placed in the Web-Project in this example.
    Hope this helps,
    Best regards,
    Robin

  • Problem in placing controls and indicator on imported pictures

    hi.
    i have a problem in placing controls and indicator on imported pictures on labview front pannel.
    when i place a control or indicator on imported picture ..the control or indicator don't stay at the top of picture but go behind the picture...
    kindly tell me what to do to avoid this....as complete project has been made and now i have to place all controls and indicator of front pannel on to a picture.

    The Front Panel is built in layers. Each new control or decoration you add is placed in the top most layer.
    To change this, select the picture, click the "Reorder" button (that's the rightmost button in the row of buttons on the toolbar, the one with the 2 arrows forming a circle), and select Move to Back. Your picture will be moved to the background and your controls will be in front of it.
    Try to take over the world!

  • Problem in placing files in server

    Hello,
    I am working on applet to servlet communication. I have developed the code but I have problem in placing the files in the tomcat server. these are my files
    test.html
    test.class (applet)
    inter.class (bean implementing serializable interface)
    testser.class (servlet)
    I have placed test.html, test.class and inter.class in webapps/examples folder. I have placed testser.class in webapps/examples/web-inf/classes folder.
    So that i can now see the applet and applet pass values to bean. But my servlet is not called. Can any one help what is going wrong or where should i place the files?
    Thanks

    Hello,
    Here goes my source code files. All of them are working source files,
    I am a bit confused in placing them in the Tomcat server. Can anyone try and post the results please?
    i.e placing the files in the proper directories of the server.
    // Register.java
    import java.sql.*;
    public class Register implements java.io.Serializable
        // data members
        private String firstname;
        private String lastname;
        private final String CR = "\n";     // carriage return
        // constructors
        public Register()
        public Register(String afirstName, String alastName)
            firstname = afirstName;
            lastname = alastName;
              RegistrationServlet regser = new RegistrationServlet();
         public String getFirstName()
                 System.out.println("In getFirstName(): " + firstname);
              return firstname;  
        public String getLastName()
            return lastname;  
    // RegistrationApplet.html
    import java.awt.*;
    import java.applet.*;
    import java.net.*;
    import java.awt.event.*;
    import java.io.*;
    public class RegistrationApplet extends Applet implements ActionListener
         String browser;
         public void init()
              setLayout(null);
              setSize(438,536);
              label1.setText("First Name*:");
              add(label1);
              label1.setFont(new Font("Dialog", Font.BOLD, 12));
              label1.setBounds(48,60,116,27);
              add(textField1);
              textField1.setBounds(168,60,180,30);
              add(textField2);
              textField2.setBounds(168,96,180,30);
              label2.setText("Last Name*:");
              add(label2);
              label2.setFont(new Font("Dialog", Font.BOLD, 13));
              label2.setBounds(48,96,94,20);
              button1.setLabel("Submit");
              add(button1);
              button1.setBackground(java.awt.Color.lightGray);
              button1.setBounds(120,444,98,30);
              label11.setText("Applet to Servlet Communication");
              add(label11);
              label11.setFont(new Font("Dialog", Font.BOLD, 24));
              label11.setBounds(108,12,288,36);
              button1.addActionListener(this);
         public void actionPerformed(ActionEvent ae)
              if(ae.getSource().equals(button1))
                   firstname = textField1.getText().trim();
                   lastname = textField2.getText().trim();
                   try{
                   String toservlet = "http://localhost:8080/servlet/RegistrationServlet";
                   URL servleturl = new URL(toservlet);
                   URLConnection servletconnection = servleturl.openConnection();
                   servletconnection.setDoInput(true);
                   servletconnection.setDoOutput(true);
                   servletconnection.setUseCaches(false);
                   servletconnection.setDefaultUseCaches(false);
                   servletconnection.setRequestProperty("Content-type","application/octet-stream");
                   // sending the values to the serialised class "Register.java"
                   register  = new Register(firstname,lastname);
                   ObjectOutputStream outputtoservlet = null;
                   outputtoservlet = new ObjectOutputStream(servletconnection.getOutputStream());
                   outputtoservlet.writeObject(register);
                   outputtoservlet.flush();
                   outputtoservlet.close();
                   catch(Exception e)
                        System.out.println("in submit  "+e);
                        e.printStackTrace();
         String firstname;
         String lastname;
         java.awt.Label label1 = new java.awt.Label();
         java.awt.TextField textField1 = new java.awt.TextField();
         java.awt.TextField textField2 = new java.awt.TextField();
         java.awt.Label label2 = new java.awt.Label();
         java.awt.Button button1 = new java.awt.Button();
         java.awt.Label label11 = new java.awt.Label();
         String parameters;
         Register register = null;
    // RegistrationServlet.java
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    public class RegistrationServlet extends HttpServlet
         public void doPost(HttpServletRequest req,HttpServletResponse res)
              ObjectInputStream inputFromApplet = null;
            Register aRegister = null;       
              try
                   inputFromApplet = new ObjectInputStream(req.getInputStream());
                   //"Reading data..."
                   System.out.println("Reading Data.......");
                 aRegister = (Register) inputFromApplet.readObject();
                   System.out.println("Completed Reading Data.......");
                   //close the connection after reading the data               
                   inputFromApplet.close();
                   // getting parameters from the serilized class "Register.java"
                   String first = aRegister.getFirstName();
                   String last = aRegister.getLastName();
                   ServletOutputStream sos = res.getOutputStream();
                   sos.println("First Name:"+first);
                   sos.println("Last Name:"+last);
              catch(Exception e)
                   System.out.println("in doPost()  "+e);
                   //e.printStackTrace();
    }Thanks

  • Facing problem in placing portlet on Web Layout

    I am facing problem in placing portlets on Web layout page-
    1. I am getting some space between the regions. I want that my portlet should join adjacent only not even a single pixel gap should be there.
    2. In Web Layout, First region is the left most and after that subsequent region comes right to first region and one after other. But my second and third region's portlet are coming adjacent instead of third region's portlet coming under second region's portlet
    Please help...............

    The first issue is a bug/feature that has been changed in 3.0.8 (9iAS MR1) due out this week. In previous releases we added spacing arbitrarily. Now, you can define the spacing in the region properties.
    I don't understand issue number 2. Can you clarify the problem?

  • Problem of BOM components uploading through BAPI,for  the Network(CN01)

    Hello,Friends,
    Iam PP consultant and facing a problem of BOM components uploading through BAPI,for creating of the Network (CN21)
    we have 300 components in the network activity and while uploading the BOM through BAPI , only 295 components has been uploaded.Others components has not uploaded.
    Please suggest me what will be the Problem? and
    What is the solution for the same?
    Regards,
    MYS

    in customizing availability checked has been applied ,for this reason one additional screen is appearing in BAPI for all these components
    How this screen could be by passed

  • Problem with flash components in director  tollbox

    1- I have 2 buttons named "makeQst1BT" in frame 1 and  "chkQst1BT" in frame 2,  which both are draged from toolbox.
    First the user gets a random question in frame 2 andhas to answer it, When the user clicks "chkQst1BT" its visible is to disappear after answering. it is done nicely  and button disappears.by  the follwing code.
    sprite("chkQst1BT").visible =false
    then later when user navigates back to a frame 1 again and wants to make a new question and presses "makeQst1BT" this button is to set the visible of "chkQst1BT" to true again by this code:
    sprite("chkQst1BT").visible =true
    BUT here I get script error  indicating that PROPERTY #visible not found.
    Why this happens? and how can I set the visible of  chkQst1BT back to true?
    ( I get many similar script errors saying PROPERTY #text not found in the same movie)
    2- I have draged many textArea flash components from toolbox, then want to change their ink from copy to background transparent, it appearantly accepts this choice but it is still displayed like "copy" with white bakgr.( I do it from property inspector window)
    What is strange is that only one of text Areas changes appearance when ink changed to background transparant but not others.
    Any ideas?
    Thanks in advance!

    First off, you should know that the flash components aren't that predictable/stable to begin with, but anyway.
    1 If the sprite only exists in frame 2 you can't change it's properties in frame 1. What you can do, and I'm reasonably sure you don't need to, is to put the visible code in a on begin sprite handler for a script on the sprite which should be run every time you enter frame 2.
    2. Works fine here so I can only speculate on what's causing your problem. My guess is that the text areas share sprite channel with some other component during your movie and that component has it's ink set to copy. Move the flash text area component to their own channels or add a behavior script to them that sets the ink in the on begin sprite handler.

  • Placing components without layout manager not working

    Hey there, I am working on a java game version of pong which I have begun to try and do using Java Swing. The problem I am currently having is reposition the components in the main window part of the game which is were the user can start a new game or close the program. I having tried using the absolute positioning by setting the layout manager to null but then everything goes blank. I can't figure out why this is not working. Here is the code so far...
    import javax.swing.*;
    import java.awt.*;
    public class SwingPractice extends JFrame
        private Container contents;
        private JLabel titleLabel;
        private JButton startGameButton;
        public SwingPractice()
            super("SwingPractice");       
            contents = getContentPane();
            contents.setLayout(null);
            this.getContentPane().setBackground(Color.BLUE);
            startGameButton = new JButton("Start Game");
            startGameButton.setFont(new Font("Visitor TT1 BRK", Font.PLAIN, 24));
            startGameButton.setForeground(Color.cyan);
            startGameButton.setBackground(Color.blue);       
            startGameButton.setBounds(350,350, 75, 75);
            titleLabel = new JLabel("The Amazing Ping Pong Game!!");
            titleLabel.setForeground(Color.cyan);
            titleLabel.setBackground(Color.blue);
            titleLabel.setOpaque(true);
            titleLabel.setFont(new Font("Visitor TT1 BRK", Font.PLAIN, 24));
            titleLabel.setBounds(0,350, 75, 75);
            contents.add(startGameButton);
            contents.add(titleLabel);
            setSize(700,350);
            setResizable(false);
            setVisible(true);
        /*private class SwingPracticeEvents implements ActionListener
        public static void main(String [] args)
            SwingPractice window = new SwingPractice();
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       Any other critiquing would be greatly appreciated. Thank you.
    Edited by: 804210 on Oct 21, 2010 1:30 PM

    804210 wrote:
    Hey there, I am working on a java game version of pong which I have begun to try and do using Java Swing. The problem I am currently having is reposition the components in the main window part of the game which is were the user can start a new game or close the program. I having tried using the absolute positioning by setting the layout manager to nullDon't. Ever. Never. Well, mostly.
    Read the tutorial chapter about [url http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]Laying out components. It even features a section on absolute positioning - which you should skip reading, of course! :o)
    And read this old Sun topic: http://forums.sun.com/thread.jspa?threadID=5411066
    Edited by: jduprez on Oct 21, 2010 10:48 PM

  • TabIndex problems in custom components

    Hello, all!
    I don't quite understand tab navigation. I have two custom
    components: a link button and a text box. I need to be able, at the
    component level, to give the textBox.swc instances tab
    functionality (tab advances to the next one, shift-tab goes to the
    previous). The linkButtons are movieClips, so that they can be
    dynamically positioned. Is it possible to set focus on something
    like that? From what I've read it is. But, I can't seem to get it
    working using the same techniques I've used before for this
    component-level tabbing.
    Just setting their tabIndexes doesn't work. The textBox
    component has a textBox embedded in a movieClip, and that component
    is, in turn, embedded into another movieClip. I dont think that
    second movieClip is the problem. I think it's that we have a
    textBox (created using this.createTextField("_textbox",
    getNextHighestDepth(), 0, 0, textWidth, textHeight) that we then
    dynamically give a tab index from a parameter, but all that does is
    highlight all text when tab is pressed.
    Does tabIndex work on multiple layers? For example, can I do
    it per movieClip? If so...that would be my problem.
    Thank you for the help!
    JA

    I've found my problem. My custom components have to implement the interface NamingContainer.

  • Problems displaying deserialized components

    I'm trying to save the state of some objects which extend JComponent and JLayeredPane, and they don't all redisplay on deserializing, although they seem to be in the containment tree.
    Basically, I have a class GamePanel which extends JLayeredPane. Also classes Square and Region both of which extend JComponent and use 2D graphics for painting themselves. It seems to serialize OK (but how does one tell?). But when I deserialize, only the lower level of the GamePanel is painted. However, the higher level is populated.
    Does anyone have any idea why they're not displaying? The code is below (TestKiller and its menus are generated by NetBeans - hence the slightly odd code). There are 5 menu items (I've simplified a lot from the original so it's a bit clunky): Add Region (you can only do this once in this version), Save As which serializes to a file, Restore which deserializes from a file, Exit which is obvious and Print which outputs the containment hierarchy of GamePanel to standard output.
    If you want to try it out, fire up the program, do a File|Add to add a Region (see the dotted lines) and File|Print to see that there's a Square at level 2 and a Region at level 3. Then File|Save as... to save it. Quit the program.
    Fire it up again and do a File|Restore and a File|Print. You'll see from the output that the Square and Region are there with identical parameters to the output before, but the Region hasn't displayed its outline.
    The output's below, with java-like comments added to show what I've done:
    D:>java -jar test*
    Painting gridlayer
    // File|Add Region
    New region 1
    Selecting square
    Checking region 1
    Painting gridlayer
    Painting region 1
    //File|Print
    Printing Gamepanel components
    com.ptoye.TestSBug1.Region[Region-1,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minim
    umSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 3
    com.ptoye.TestSBug1.Square[Square-0:0,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=16777224,maximumSi
    ze=,minimumSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 2
    \\File|Save
    Saving game to bug1.ksd
    D:>java -jar test*
    Painting gridlayer
    \\File|Restore
    Restoring game bug1.ksd
    Restored
    \\File|Print - same as above but only Square is displayed
    Printing Gamepanel components
    com.ptoye.TestSBug1.Region[Region-1,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=0,maximumSize=,minim
    umSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 3
    com.ptoye.TestSBug1.Square[Square-0:0,4,4,60x60,alignmentX=0.0,alignmentY=0.0,border=,flags=16777224,maximumSi
    ze=,minimumSize=,preferredSize=]
    Bounds java.awt.Rectangle[x=4,y=4,width=60,height=60]
    Layer 2
    D:>
    Please someone tell me what I'm doing wrong. As a serialization newbie it's probably something simple, but no amount of validate() and pack() makes any difference.
    The code's below - a bit long I'm afraid but it's difficult to cut it down much more and display the problem. The main class (TestKiller) was generated by NetBeans.
    * TestKiller.java
    * Created on 01 August 2006, 22:13
    package com.ptoye.TestSBug1;
    import java.io.File;
    import java.io.FileFilter;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import javax.swing.JFileChooser;
    import javax.swing.JOptionPane;
    * @author  PToye
    public class TestKiller extends javax.swing.JFrame {
      private GamePanel p;
      final String fileExtension="ksd";
       * Creates new form TestKiller
      public TestKiller() {
        initComponents();
        p=new GamePanel();
        setContentPane(p);
        p.setOpaque(true);
        setSize(p.getPreferredSize());
        pack();
      public static void showMessage(String s) {
        JOptionPane.showMessageDialog(null,s,"Error",JOptionPane.ERROR_MESSAGE);
      /** This method is called from within the constructor to
       * initialize the form.
       * WARNING: Do NOT modify this code. The content of this method is
       * always regenerated by the Form Editor.
      private void initComponents() {                         
        jMenuBar1 = new javax.swing.JMenuBar();
        jmFile = new javax.swing.JMenu();
        jmiAddRegion = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        jmiSaveAs = new javax.swing.JMenuItem();
        jmiRestore = new javax.swing.JMenuItem();
        jmiExit = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jmiPrint = new javax.swing.JMenuItem();
        FormListener formListener = new FormListener();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Restore bug");
        jmFile.setText("File");
        jmiAddRegion.setText("Add region");
        jmiAddRegion.addActionListener(formListener);
        jmFile.add(jmiAddRegion);
        jmFile.add(jSeparator2);
        jmiSaveAs.setMnemonic('s');
        jmiSaveAs.setText("Save as...");
        jmiSaveAs.addActionListener(formListener);
        jmFile.add(jmiSaveAs);
        jmiRestore.setMnemonic('r');
        jmiRestore.setText("Restore");
        jmiRestore.addActionListener(formListener);
        jmFile.add(jmiRestore);
        jmiExit.setMnemonic('x');
        jmiExit.setText("Exit");
        jmiExit.addActionListener(formListener);
        jmFile.add(jmiExit);
        jmFile.add(jSeparator1);
        jmiPrint.setText("Print");
        jmiPrint.addActionListener(formListener);
        jmFile.add(jmiPrint);
        jMenuBar1.add(jmFile);
        setJMenuBar(jMenuBar1);
        pack();
      // Code for dispatching events from components to event handlers.
      private class FormListener implements java.awt.event.ActionListener {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
          if (evt.getSource() == jmiSaveAs) {
            TestKiller.this.jmiSaveAsActionPerformed(evt);
          else if (evt.getSource() == jmiRestore) {
            TestKiller.this.jmiRestoreActionPerformed(evt);
          else if (evt.getSource() == jmiExit) {
            TestKiller.this.jmiExitActionPerformed(evt);
          else if (evt.getSource() == jmiPrint) {
            TestKiller.this.jmiPrintActionPerformed(evt);
          else if (evt.getSource() == jmiAddRegion) {
            TestKiller.this.jmiAddRegionActionPerformed(evt);
      private void jmiAddRegionActionPerformed(java.awt.event.ActionEvent evt) {                                            
        p.dummyAdd();
        jmiAddRegion.setEnabled(false);
      private void jmiPrintActionPerformed(java.awt.event.ActionEvent evt) {                                        
        p.print();
      private void jmiSaveAsActionPerformed(java.awt.event.ActionEvent evt) {                                         
        File f;
        ObjectOutputStream oos=null;
        JFileChooser jfc=new JFileChooser();
        jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        jfc.setMultiSelectionEnabled(false);
        jfc.addChoosableFileFilter(jfc.getAcceptAllFileFilter());
        jfc.addChoosableFileFilter(new KDSFileFilter());
        jfc.showSaveDialog(this);
        f=jfc.getSelectedFile();
        if (f==null) {
          showMessage("Null file found");
        int i=f.getName().lastIndexOf(".");
        if (i==-1) {
          f=new File(f.getAbsolutePath()+"."+fileExtension);
        try {
          oos=new ObjectOutputStream(new FileOutputStream(f));
        } catch (FileNotFoundException ex) {
          showMessage("Cannot find file "+f.getName());
          return;
        } catch (IOException ex) {
          showMessage("Cannot open file "+f.getName());
          return;
        if (oos!=null) {
          System.out.println("Saving game to "+f.getName());
          try {
            oos.writeObject(p);
          } catch (IOException ex) {
            showMessage("Cannot write game to "+f.getName()+"\n"+ex.getMessage());
          } finally {
            try {
              oos.close();
            } catch (IOException ex) {
      private void jmiExitActionPerformed(java.awt.event.ActionEvent evt) {                                       
        System.exit(0);
      private void jmiRestoreActionPerformed(java.awt.event.ActionEvent evt) {                                          
        File f;
        ObjectInputStream ois=null;
        JFileChooser jfc=new JFileChooser();
        jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        jfc.setMultiSelectionEnabled(false);
        jfc.addChoosableFileFilter(jfc.getAcceptAllFileFilter());
        jfc.addChoosableFileFilter( new KDSFileFilter());
        jfc.showOpenDialog(this);
        f=jfc.getSelectedFile();
        if (f!=null) {
          try {
            ois=new ObjectInputStream(new FileInputStream(f));
          } catch (FileNotFoundException ex) {
            showMessage("Cannot find file "+f.getName());
            return;
          } catch (IOException ex) {
            showMessage("Cannot open file "+f.getName());
            return;
          if (ois!=null) {
            System.out.println("Restoring game "+f.getName());
            try {
              p=(GamePanel) ois.readObject();
            } catch (IOException ex) {
              showMessage("Cannot read game from file "+f.getName());
            } catch (ClassNotFoundException ex) {
              showMessage("Cannot restore game - wrong object type");
            try {
              ois.close();
            } catch (IOException ex) {
            pack();
            p.validate();
            p.repaint();
            System.out.println("Restored");
      private class KDSFileFilter extends javax.swing.filechooser.FileFilter {
        public boolean accept(File f) {
          if (f.isDirectory()) {
            return true;
          String ext = null;
          String s = f.getName();
          int i = s.lastIndexOf('.');
          if (i > 0 &&  i < s.length() - 1) {
            ext = s.substring(i+1).toLowerCase();
          return (ext==null || ext.equalsIgnoreCase(fileExtension));
        public String getDescription() {
          return "Killer Su Doku games";
       * @param args the command line arguments
      public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
            new TestKiller().setVisible(true);
      // Variables declaration - do not modify                    
      private javax.swing.JMenuBar jMenuBar1;
      private javax.swing.JSeparator jSeparator1;
      private javax.swing.JSeparator jSeparator2;
      private javax.swing.JMenu jmFile;
      private javax.swing.JMenuItem jmiAddRegion;
      private javax.swing.JMenuItem jmiExit;
      private javax.swing.JMenuItem jmiPrint;
      private javax.swing.JMenuItem jmiRestore;
      private javax.swing.JMenuItem jmiSaveAs;
      // End of variables declaration                  
    * GamePanel.java
    * Created on 10 January 2007, 18:45
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Set;
    import javax.swing.JLayeredPane;
    * @author PToye
    public class GamePanel extends JLayeredPane implements Serializable {
      private static final int GRID_LEVEL=2;
      private static final int REGIONS_LEVEL=3;
      private static final int THICK_WIDTH=4;
      private static final int THIN_WIDTH=1;
      static final int SQUARE_SIZE=60;
      private static final int SQUARES=1;  // test size
      static final int BIGSQUARES=SQUARES*SQUARES;
      static final int TotalSize=(SQUARES+1)*THICK_WIDTH+SQUARES*(SQUARES-1)*THIN_WIDTH+
          BIGSQUARES*SQUARE_SIZE;
      public final Color NORMAL_BACK_COLOUR=Color.WHITE;
      public final Color SELECTED_BACK_COLOUR=Color.PINK;
      int coordArray;  // used to be an array of start coords of each square
      private Region newRegion;
      private int regionId=1;
      private Square squareArray; // used to be an array
      private Region regions; // used to be a set
      /** Creates a new instance of GamePanel */
      public GamePanel() {
        super();
        regions=null;
        makeGridLayer();  //adds the white square
        setPreferredSize(new Dimension(TotalSize,TotalSize));
        setVisible(true);
        newRegion=null;
        setFocusable(true);
      public void dummyAdd() {
        setupRegion(squareArray);
        if (newRegion.checkNewRegion(1)) {
          addRegion(newRegion);
      public void addRegion(Region r) {
        if (regions==null) {
          regions=r;
          add(r,new Integer(REGIONS_LEVEL));
          r.repaint();
      void print() {
        Component[] cList=getComponents();
        System.out.println("Printing Gamepanel components");
        for (int i = 0; i < cList.length; i++) {
          Component c=cList;
    System.out.println(c.toString());
    System.out.println(" Bounds "+c.getBounds());
    System.out.println(" Layer "+getLayer(c));
    if (c instanceof Container) {
    printContainer((Container)c," ");
    void printContainer(Container c, String preString) {
    Component[] cList1=c.getComponents();
    for (int i = 0; i < cList1.length; i++) {
    Component comp=cList1[i];
    System.out.println(preString+comp.toString());
    System.out.println(preString+" Bounds "+comp.getBounds());
    if (comp instanceof Container) {
    printContainer((Container)comp,preString+" ");
    private void setupRegion(Square s) {
    if (newRegion==null) {
    newRegion=new Region(regionId++,this);
    Region r=s.getRegion();
    if (r==null) {
    newRegion.addSquare(s);
    selectSquare(s);
    s.setRegion(newRegion);
    } else {
    System.exit(1); // should not happen
    private void makeGridLayer() {
    int currentXCoord;
    int currentYCoord;
    int arrayIndex=0;
    Square sq;
    currentXCoord=THICK_WIDTH;
    currentYCoord=THICK_WIDTH;
    coordArray=currentYCoord;
    sq=new Square(0,0, NORMAL_BACK_COLOUR,this);
    add(sq,new Integer(GRID_LEVEL));
    squareArray=sq;
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    System.out.println("Painting gridlayer");
    g2.setBackground(Color.BLACK);
    g2.setColor(Color.BLACK);
    g2.fillRect(0,0,TotalSize,TotalSize);
    void selectSquare(Square s) {
    System.out.println("Selecting square");
    s.setBackColour(SELECTED_BACK_COLOUR);
    * Square.java
    * Created on 28 December 2006, 15:53
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.io.Serializable;
    import javax.swing.JComponent;
    * @author PToye
    class Square extends JComponent implements Serializable {
    * X index in grid
    private int xIndex;
    * Y index in grid
    private int yIndex;
    * The square's parent grid
    private GamePanel parent;
    * Region it belongs to (or null if none)
    private Region region;
    * The background colour
    private Color backColour;
    private boolean marked;
    // public Square() {
    // System.out.println("New Square - null constructor");
    // addMouseListener(parent);
    * Create a new square
    public Square(int x, int y, Color bcol, GamePanel parent) {
    this.parent=parent;
    xIndex=x;
    yIndex=y;
    backColour=bcol;
    region=null;
    setName("Square-"+x+":"+y);
    setBounds(parent.coordArray,parent.coordArray,
    GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    setOpaque(true);
    setVisible(true);
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    // System.out.println("Painting square "+xIndex+","+yIndex+":"+getBounds());
    g2.setColor(backColour);
    g2.fillRect(0,0,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    g2.setColor(Color.BLACK);
    public Dimension getPreferredSize() {
    return new Dimension(GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    public void setBackColour(Color backColour) {
    this.backColour = backColour;
    repaint(0,0,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    public Region getRegion() {
    return region;
    public void setRegion(Region region) {
    this.region = region;
    * Region.java
    * Created on 28 December 2006, 15:59
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.ptoye.TestSBug1;
    import java.awt.BasicStroke;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.geom.GeneralPath;
    import java.io.Serializable;
    import java.util.HashSet;
    import java.util.Iterator;
    import java.util.Set;
    import javax.swing.JComponent;
    * @author PToye
    * Class representing a region whose total sum is known
    public class Region extends JComponent implements Serializable {
    private static final float BORDER_WIDTH=1f;
    private static final float DASH_LENGTH=4f;
    private static final float[] dashes={DASH_LENGTH,DASH_LENGTH};
    private static final BasicStroke borderStroke=
    new BasicStroke(BORDER_WIDTH,BasicStroke.CAP_BUTT,BasicStroke.JOIN_MITER,
    1f,dashes,0);
    private static final int borderInset=3;
    private GamePanel parent;
    * The sum as given
    private int total;
    private String totalString;
    private int id;
    * The squares constituting the region
    private Square contents; // the square in the region
    private Square leadSquare; // top left-hand square
    private int leadXCoord,leadYCoord; // X, Y coords of lead square wrt border
    private GeneralPath border=null;
    public Region(int id, GamePanel parent) {
    super();
    this.id=id;
    this.parent=parent;
    setName("Region-"+id);
    contents=null;
    border=new GeneralPath();
    System.out.println("New region "+id);
    public void addSquare(Square s) {
    if (contents!=null) {
    contents=s;
    public boolean checkNewRegion(int tot) {
    System.out.println("Checking region "+id);
    border.moveTo(borderInset,borderInset);
    border.lineTo(GamePanel.SQUARE_SIZE-borderInset,borderInset);
    border.lineTo(GamePanel.SQUARE_SIZE-borderInset,GamePanel.SQUARE_SIZE-borderInset);
    border.lineTo(borderInset,GamePanel.SQUARE_SIZE-borderInset);
    border.lineTo(borderInset,borderInset);
    setBounds(parent.coordArray,parent.coordArray,GamePanel.SQUARE_SIZE,GamePanel.SQUARE_SIZE);
    repaint();
    return true;
    public void paintComponent(Graphics g) {
    int newX, newY;
    System.out.println("Painting region "+id);
    super.paintComponent(g);
    Graphics2D g2=(Graphics2D) g;
    g2.setColor(Color.BLACK);
    g2.setStroke(borderStroke);
    g2.draw(border);

    OK, I asked the FTE team and got this reply: "Lucida Grande is CTS's fallback font for Thai.  This font on OS 10.7 and 10.6 are not supporting Thai anymore.  The version on 10.5 was supporting it." This means that it's our bug that we keep using Lucida Grande as fallback font even Apple dropped support Thai script with that font after 10.6. Unfortunately this bug was deferred from current development release (11.2) because of time constraint. If this support is critical for your business, can you open a bug in our public bugbase and ask as many vote as possible? In this way I may be able to convince internal team to fix this bug in next release.
    Thank you for your feedback!
    Hitomi

  • Problems printing placed gradient mesh graphics

    CS3 Illustrator and InDesign. Whenever a drawing is created in Illustrator using gradient mesh, and placed into an InDesign document, our printer (Ricoh Aficio 2232C with postscript) all the gradient mesh areas print from InDesign as solid black. I have tried changing every print setting I can think of, but it always comes out the same.
    There are workarounds of course (like saving the illustration as a tiff) but I'd like to work with the original file if possible. Any ideas in how I can proceed in fixing this?

    I wouldn't worry too much about trying to keep the original file intact. ... Of course you should, but there is nothing wrong with making a version "specially for print". It takes some discipline in that you have to edit the original file and always remember to save a flattened copy to update in your document.
    You have to consider there are printers out there (the guys with the weathered faces and hot lead-resistant calluses, not the buzzing, ink-eating and paper spitting type -- okay, maybe they do that as well) with older RIP software or hardware that may have similar problems with very (very) complicated graphics. It's better to play safe than to re-make your image until it can just be processed by your own local printer.

  • Problem in placing line tool position

    Hi, Can any one solve this problem.
    I have created script for line tool but it not running in particular place. I will explain in detail.
    Job Ms
    I/P: America is a [SL 10] country.
    Error in output: America is a country .................   (or)  ................. America is a country  (or)  America  ................. is a country (Rule is Placing somewere else i need correct position)
    Original output should be like this
    Error in output: America is a  ................. country
    I need a 10 mm underline instead of [SL 10]
    It should replace [SL 10] and put a 10 mm rule in that position.
    In my script rule is creating but the rule is placing some were else. Please solve this problem. Ihave created library also for [SL10]. 
    Here is my script coding
    app.findTextPreferences=null;
    app.changeTextPreferences=null;
    app.findChangeTextOptions.caseSensitive=false;
    app.findChangeTextOptions.includeHiddenLayers=true;
    app.findChangeTextOptions.includeLockedLayersForFind=true;
    app.findChangeTextOptions.includeLockedStoriesForFind=true;
    mydoc=app.activeDocument;
    app.findTextPreferences.findWhat="[SL 10]"
    myFounds=mydoc.findText();
    var myLib=app.libraries.item(0);
    var myassets=myLib.assets.item("SL10");
    for(i=0;i<myFounds.length;i++)
        myFound=myFounds[i];
        myFound.remove();
        myAnchorrule=myassets.placeAsset(myFound.insertionPoints[0])[0];
        //myAnchorrule.appliedObjectStyle=mydoc.objectStyles.item("SL");

    Hi csm_phil,
    Iam sorry last week iam out of station this script is working well but still some problem occurs.
    The problem is how to find SL20, Sl30, Sl40, Sl50 in same manuscript.
    mydoc=app.activeDocument;
    var myLib=app.libraries.item(0);
    var myassets=myLib.assets.item("SL10");
    app.findTextPreferences=null;
    app.changeTextPreferences=null;
    app.findChangeTextOptions.caseSensitive=false;
    app.findChangeTextOptions.includeHiddenLayers=true;
    app.findChangeTextOptions.includeLockedLayersForFind=true;
    app.findChangeTextOptions.includeLockedStoriesForFind=true;
    app.findTextPreferences.findWhat="[SL 10]";
    myFounds=mydoc.findText();
    for(i=myFounds.length-1;i>=0; i--)
        myFound=myFounds[i];
        myAnchorrule=myassets.placeAsset(myFound.insertionPoints[0])[0];
        myFound.remove();
    var myassets=myLib.assets.item("SL20");
    app.findTextPreferences=null;
    app.changeTextPreferences=null;
    app.findChangeTextOptions.caseSensitive=false;
    app.findChangeTextOptions.includeHiddenLayers=true;
    app.findChangeTextOptions.includeLockedLayersForFind=true;
    app.findChangeTextOptions.includeLockedStoriesForFind=true;
    app.findTextPreferences.findWhat="[SL 20]";
    myFounds=mydoc.findText();
    for(i=myFounds.length-1;i>=0; i--)
        myFound=myFounds[i];
        myAnchorrule=myassets.placeAsset(myFound.insertionPoints[0])[0];
        myFound.remove();
    var myLib=app.libraries.item(0);
    var myassets=myLib.assets.item("SL30");
    app.findTextPreferences=null;
    app.changeTextPreferences=null;
    app.findChangeTextOptions.caseSensitive=false;
    app.findChangeTextOptions.includeHiddenLayers=true;
    app.findChangeTextOptions.includeLockedLayersForFind=true;
    app.findChangeTextOptions.includeLockedStoriesForFind=true;
    app.findTextPreferences.findWhat="[SL 30]";
    myFounds=mydoc.findText();
    for(i=myFounds.length-1;i>=0; i--)
        myFound=myFounds[i];
        myAnchorrule=myassets.placeAsset(myFound.insertionPoints[0])[0];
        myFound.remove();
    This script is working for sl 10 only please check and confirm

Maybe you are looking for

  • HP Printer (scan function) not compatible with Time Capsule

    I bought a HP Deskjet 4580 and it is recognized by OSX 10.6.6 as 4500 series. I have downloaded latest drivers via Software Update (today - Jan 20th 2011) and the scanner works fine when plugged in to USB. I can see it in the Airport Utility and inst

  • Premiere Pro doesn't recognize my monitor resolution.

    My monitor has a 2560 x 1440 Pixel Resolution 27" LCD Display. I just switched from Premiere Pro CS6 to Premiere Pro CC. When I open the program, it says my monitor does not meet the minimum size requirements. It clearly doesn't recognize the high-re

  • ESA using SAP XI

    Hi All- There have been quite a few posting in this forum regarding the role of Exchange Infrastructure in achieving ESA. XI acting as an integrator of the buisness processes; which actually inturn would aggregate to an organisation achieving the SOA

  • What is "Audible User Name"

    I supposedly got the fix for my (-50)error. It came right from Apple. First step is to go into Advanced in Itunes and "Deauthorize Audible Account" I plugged the same user name and password as I always do. and it tells me that my username or password

  • ATTRIBUTES QUESTION URGENT PLZZZZZZZZZ

    Hi gurus, Is <b>Gender, Nationality, language, country key, postal code and region fall into display or navigational attributes catagory????</b> thanks for the help in advance.