Layout & Frames

I'm doing some web pages in DW. I've used frames in one page
that had a graphic. I have two columns in the first row and one
column in the second row.. The layout in DW is perfect. The first
row has text in the first column and a 320 X 240 graphic. I've set
the text frame to a height of 240 and the height of the graphic
frame to 240. I've set the width to 480 on the text frame and the
width of the graphic frame to 320. I'm trying to get the online to
look like the layout.
It didn't work - the text pushed the frame down so that the
graphic was centered - there was about an inch of space above the
graphic and about an inch below the graphic. Nothing I do corrects
the problem.
I downloaded a trial of GoLive - opened the same page in GL,
saved it, uploaded and it was almost perfect.
I've purchased DW, so I don't want to buy GL. Do any of you
know how to get DW to be precise?
Thanks and Merry Christmas to all.
Tim

CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<title>Eric &amp; Papa Adventures</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
<!--
BODY
{scrollbar-face-color: #780000;
scrollbar-shadow-color: #000000;
scrollbar-highlight-color: #d8d4d8;
scrollbar-track-color: #d8d4d8;
scrollbar-arrow-color: #000000;}
-->
</style>
</head>
<body>
<h4>
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="800" height="50">
<param name="movie" value="banner.swf">
<param name="quality" value="high">
<embed src="banner.swf" quality="high" pluginspage="
http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="800"
height="50"></embed>
</object>
</h4>
<table width="800" border="0">
<tr>
<td width="460"><h4><font color="#780000"
face="Arial, Helvetica, sans-serif">Adventures of Eric and
Papa!!</font></h4>
<p align="justify"><font face="Arial, Helvetica,
sans-serif"><font size="2">There is nothing like a
grandfather and grandson fishing. It is a time to bond, relax and
fish. My grandson Eric is 12 years old and is for sure my little
fishing buddy. When I was a child, neither my father nor
grandfathers ever did much of anything with me. When my daughter
and her family moved to Florida two years ago, I made a promise
that I would not be an absentee grandfather. <br>
<br>
</font><font size="2" face="Arial, Helvetica,
sans-serif">Eric and I went bass fishing at a small lake near
where we live. Before long, Eric had snagged a bread bag full of
water. At that very moment, I noticed a slight movement in the
water. I yelled, &quot;Eric, back up.&quot; Before he could
move, the bag fell off his hook and hit the water. A big gator
jumped to get the bag. Eric dropped his rod and ran as hard as he
could run. When he got to the road, he just kept right on
running</font>.<font size="2"> <br>
</font></font></p></td>
<td width="330" align="center" valign="middle"
nowrap><table width="330" border="0">
<tr>
<td><img src="../graphics/eric.jpg" width="320"
height="240"></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"><p align="justify"><font
size="2" face="Arial, Helvetica, sans-serif">We gathered the
gear and went home. That was all the fishing he wanted to do for
that day. My daughter, Jennifer, Eric's mother threw a fit.
&quot;You took my son to a lake with gators?&quot; I
replied, &quot;you are in Florida, lakes have gators and oceans
have sharks.&quot; We were grounded from fishing until Eric's
parents realized that I was watching him carefully and that he
wasn't in real danger, as I was close enough to pull him from any
harm.</font></p>
<p align="justify"><font size="2" face="Arial,
Helvetica, sans-serif">Two days later, I went back to the lake.
The gator was in the middle of the lake. As soon as he saw me, he
swam right up to where I was standing. Someone had fed the gator. I
called Florida Wildlife Commission, the gator had to be removed
because he had lost his fear of humans. Its a shame that people
won't follow common sense rules.</font></p>
<p align="justify"><font size="2" face="Arial,
Helvetica, sans-serif">One day, we went to the Skyway Bridge to
fish. It was cold and rainy. The fish were not biting. We fished
for two hours without one nibble. It started to rain so I asked him
if he was ready to go. He asked me if we could stay and wait out
the rain. It took an hour for the rain to stop. We fished for two
more hours and never got one bite. On the way home, I said,
&quot;I wish we could have caught some fish.&quot; Eric
replied, &quot;Papa, its the sport that counts.&quot; That
might be good enough for him but I want some fish.
</font></p>
<p align="justify"><font size="2" face="Arial,
Helvetica, sans-serif">Recently, we went wade fishing near the
Gandy Bridge. The fishing was good if you like to catch catfish.
The water was chilly for a June day. I caught Eric when he wasn't
looking and splashed cold water all over his little bare back. He
screamed and laughed hard. A few minutes later, he had a bucket of
water ready to dump on Papa's back. He wasn't fast enough.
</font></p>
<p align="justify"><font size="2" face="Arial,
Helvetica, sans-serif">The special part of that day came later.
I looked over at that little guy and the look on his face was
amazing. His face showed pure contentment. He appeared to be the
happiest boy on earth. There is nothing like spending time with a
child fishing. </font></p>
<p><font size="2" face="Arial, Helvetica,
sans-serif">If you have a son, daughter, or grandchild - take
'em fishing! You will never regret the time you
spend.</font></p>
<p><font size="2" face="Arial, Helvetica,
sans-serif">Papa (Tim A.
Setliff)</font></p></td>
</tr>
</table>
<h4> </h4>
</body>
</html>

Similar Messages

  • When i adjust the layout frame total fields structure changed

    Hi........
    i developed new form when ever change the layout frame then the fields structure changed.
    if i adjust the frame fields structure changed.
    what i do please give me any solution
    Regards
    Maha

    Hi,
    Thanks for giving replay i got solution in oracle form 10g .
    go to frame property pallet "update layout =manual".
    regards
    Maha

  • Box layout

    used BOX LAYOUT
    I have two panels, one header having two labels
    another panel inside scrollpane,
    but first panel by default comes to center
    so,
    i set panelHeader.setAlignmentX(Component.LEFT);
    now first panel comes slightly to left side but still not aligned with second panel

    JUst Add yout comp[onents on that panel ok
    panel2 & panel 3
    Panel2 is  the left panel & panel3 is the right panel ok
    Dear Bye
    import javax.swing.*;
    class layout
         BoxLayout box;
         JFrame frame;
         JPanel panel1 , panel2 , panel3;
         layout()
              frame = new JFrame();
              panel1 = new JPanel();
              panel2 = new JPanel();
              Panel3 = new JPanel();
              box = new BoxLayout(panel1,BoxLayout.X_AXIS);     // horizontal Layout   And Y_AXIS For vertical
              frame.getContentPane().add(panel1);
              panel1.setLayout(box);
              panel1.add(panel2);
              panel1.add(panel3);
         public static void main(String ss[])
              layout ll = new layout();
    }

  • Report multiple layout

    hi all,
    i just want to know how to create multiple layout.
    based on the parameter selected i should run the particular layout.
    how to do it.
    any one help
    regards
    Rajesh

    Hi Rajesh,
    create your 2 layouts in the same report und surround each of the two layouts with a frame. Connect the upper left edges of the frames with an anchor, which has the properties collapsing activated. The write for layout/frame 1 a format-trigger:
    IF :param_layout = 'A' then RETURN TRUE; ELSE RETURN FALSE; END IF;
    and for layout/frame 2 a format trigger
    IF :param_layout = 'B' then RETURN TRUE; ELSE RETURN FALSE; END IF;
    So only one of the layouts is used and Layout 2 is because of the collabsing anchor at the same position as Layout 1
    Regards
    Rainer

  • Is there any simple layout manager?

    One that just put things where I wanted them without changing their location?
    I've set the x and y for each component, why changing it?
    I've tried setting the layout manager to null but then it just doesn't display nothing...

    > But when I did that, nothing displayed even though
    I've set the location and size of each component.
    You can do it like this:import javax.swing.*;
    public class HelloWorldSwing {
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("null layout");
            frame.setSize(150,150);
            frame.setLayout(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JLabel label = new JLabel("Testing 1, 2...");
            label.setBounds(30,20,100,25);
            /*  setBounds(30,20,100,25) =
            +----------------------------------------
            |          ^
            |          | 20
            |   30     v           100
            |<--------> <----------------------->
            |                                   ^
            |                                   | 25
            |                                   v
            |
            frame.getContentPane().add(label);
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }But it's better to use a layout manager. This is a good tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

  • JComBridge is no reponse, but not dead

    i have two WLS in a cluster using two JCOMBridges.
    Sometimes, one of the JComBridge is not accesable (VB client cannot locate the
    JComBridge). But the VB clients which connected to this JcomBridge before are
    still working fine as well as those two WLS in the cluster. When i stop and re-start
    the JComBridge, evrything goes fine.... ><
    Please help me...
    Thanks in advance.

    Seems to work fineimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test {
      public static void main(String[] args) {
    // Create the frame
        String title = "Duttmail- Mail client";
        JFrame frame = new JFrame(title);
    // Create a component to add to the frame
        JComponent comp = new JTextArea();
    // Add the component to the frame's content pane;
    // by default, the content pane has a border layout
        frame.getContentPane().add(comp, BorderLayout.CENTER);
    // Create the menu bar
        JMenuBar menuBar = new JMenuBar();
    // Create a menu
        JMenu file = new JMenu("File");
        JMenu edit = new JMenu("Edit");
        JMenu tools = new JMenu("Tools");
        menuBar.add(file);
        menuBar.add(edit);
        menuBar.add(tools);
    // Create a menu item
        JMenuItem exit = new JMenuItem("Exit");
        JMenuItem copy = new JMenuItem("Copy");
        JMenuItem paste = new JMenuItem("Paste");
        JMenuItem delete = new JMenuItem("Delete");
        JMenuItem account = new JMenuItem("Account Settings");
    // item.addActionListener(actionListener);
        file.add(exit);
        edit.add(copy);
        edit.add(paste);
        edit.add(delete);
        tools.add(account);
    // Install the menu bar in the frame
        frame.setJMenuBar(menuBar);
    // Create a child container which is to be associated with a tab
        JPanel panel = new JPanel();
    // Add label to panel --- BBRITTA
        panel.add(new JLabel("My Label"));
    // Add components to the panel...
    // Specify on which edge the tabs should appear
        int location = JTabbedPane.TOP; // or BOTTOM, LEFT, RIGHT
    // Create the tabbed pane
        JTabbedPane pane = new JTabbedPane();
    // Add a tab
        String label = "Inbox";
        pane.addTab(label, panel);
    // Add tabs to content --- BBRITTA
        frame.getContentPane().add(pane, BorderLayout.WEST); 
    // Show the frame
        frame.setSize(600, 600);
        frame.setVisible(true);
    }

  • Problem with jpanel size

    Hi I want to add a view port to a JPanel
    the main problem is that the Jpanel change size as the frame.
    how can i make it independent from the frame so having it; own w, h
    thanks
    package help;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import javax.swing.*;
    public abstract class MyFrame extends JFrame {
    private static final long serialVersionUID = 1L;
    private static JButton drawCircle, drawRectangle, drawSquare, drawStar, start, clear,quit,back, screenshoot;
    static final int FPS_MIN = 0;
    static final int FPS_MAX = 150;
    static final int FPS_INIT = 0;
    static int fps;
    double x1,x2;
    double y1,y2;
    int dr =1;
    int dy= 1;
    int Selection=0;
    boolean click=true; //check if start has been clicked
    int width = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;  // screen width
    int height = java.awt.Toolkit.getDefaultToolkit().getScreenSize().height;     //screen higth
    protected static int count;
    int R,G,B;  //color
    Cursor c;                    //cursor object
    private static ShapePanel bpnl;
    public MyFrame()
            R=G=B=0;
            int width = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;
            int height = java.awt.Toolkit.getDefaultToolkit().getScreenSize().height-100;
            JFrame frame=new JFrame();
            BorderLayout layout=new BorderLayout();
            frame.setLayout(layout);
            frame.setTitle("Game");
            //panel to hold buttons
            JPanel upPanel = new JPanel();
            upPanel.setLayout(new FlowLayout());
            upPanel.setSize(width, height/5);
            //panel to hold SLIDERS
            JPanel leftPanel = new JPanel();
            leftPanel.setLayout(new BoxLayout(leftPanel, BoxLayout.Y_AXIS));
            leftPanel.setSize(50, height);
            //initialize buttons and add to the upPanel
            drawCircle=new JButton("Draw Circle");
            upPanel.add(drawCircle);
            drawStar=new JButton("Draw Star");
            upPanel.add(drawStar);
            drawRectangle=new JButton("Draw Rectangle");
            upPanel.add(drawRectangle);
            drawSquare=new JButton("Draw Square");
            upPanel.add(drawSquare);
            start=new JButton("Start");
            start.setBackground(Color.GREEN);
            //upPanel.add(start);
            clear=new JButton("Clear");
            upPanel.add(clear);
            back=new JButton("Back");
            upPanel.add(back);
            quit=new JButton("Quit");
            quit.setBackground(Color.red);
            upPanel.add(quit);  
            screenshoot=new JButton("ScreenShoot");
            c = new Cursor (Cursor.CROSSHAIR_CURSOR);     //Change cursor to cross hair
         this.setCursor (c);
            //new object spanel to hold TIMER
            JPanel spanel=new JPanel();
                spanel.setLayout(new GridLayout());
                //slider dimension construction
                JSlider sDimension = new JSlider(JSlider.HORIZONTAL,FPS_MIN, FPS_MAX, FPS_INIT);
                sDimension.setMajorTickSpacing(30);
                sDimension.setMinorTickSpacing(3);
                sDimension.setPaintTicks(true);
                sDimension.setPaintLabels(true);
                Font font = new Font("Serif", Font.ITALIC, 15);
                sDimension.setFont(font);
                sDimension.setBorder(BorderFactory.createTitledBorder("Shape Dimension"));
                //slider speed construction
                int FPS_MIN_s = 0;
                int FPS_MAX_s = 60;
                int FPS_INIT_s = 0;    //initial frames per second
                JSlider sSpeed = new JSlider(JSlider.HORIZONTAL,FPS_MIN_s, FPS_MAX_s, FPS_INIT_s);
                sSpeed.setBorder(BorderFactory.createTitledBorder("Shape Speed"));
             ////////////////////////// // slider colors////////////////////////////////////////////////////
                int FPS_MIN_C = 0;
                int FPS_MAX_C = 250;
                int FPS_INIT_C = 0;  
                JSlider sliderR= new JSlider(JSlider.HORIZONTAL,FPS_MIN_C, FPS_MAX_C, FPS_INIT_C);
                sliderR.setBorder(BorderFactory.createTitledBorder("Red Channel"));
                JSlider sliderG= new JSlider(JSlider.HORIZONTAL,FPS_MIN_C, FPS_MAX_C, FPS_INIT_C);
                sliderG.setMajorTickSpacing(50);
                sliderG.setMinorTickSpacing(25);
                sliderG.setPaintTicks(true);
                sliderG.setPaintLabels(true);
                sliderG.setFont(font);
                sliderG.setBorder(BorderFactory.createTitledBorder("Green Channel"));
                JSlider sliderB= new JSlider(JSlider.HORIZONTAL,FPS_MIN_C, FPS_MAX_C, FPS_INIT_C);
                sliderB.setBorder(BorderFactory.createTitledBorder("Blue Channel"));
              //     spanel.add(sSpeed,BorderLayout.EAST);
                  frame.add(upPanel,BorderLayout.NORTH);
                  frame.add(leftPanel,BorderLayout.WEST);
                  bpnl = new ShapePanel(3000,3000);
                        System.out.println("panel width = "+bpnl.getWidth() +"  heigth = " + bpnl.getHeight());
                        bpnl.setFocusable(true);
                  upPanel.setBackground(Color.DARK_GRAY);
                  upPanel.setBorder(BorderFactory.createLineBorder(Color.white));
            frame.add(spanel,BorderLayout.SOUTH);       
            frame.add(bpnl, BorderLayout.CENTER);
            frame.setSize(width, height);
            frame.setVisible(true);               
               leftPanel.add(sliderR);
               leftPanel.add(sliderB);
               leftPanel.add(sliderG);
               leftPanel.add(sDimension,BorderLayout.WEST); 
                 System.out.println("panel width = "+bpnl.getWidth() +"  heigth = " + bpnl.getHeight());
              public static  int getPanelWidth()
                  System.out.println("panel width   "+bpnl.getWidth());
                  return bpnl.getWidth();
              public static  int getPanelHeigth()
                  System.out.println("Panel heigth  " +bpnl.getHeight());
                  return bpnl.getHeight();
              public static void main(String args[])
                  new MyFrame() {};
    package help;
    import java.awt.Cursor;
    import java.awt.Graphics;
    import javax.swing.JPanel;
    class ShapePanel extends JPanel  {
         private static final long serialVersionUID = 1L;
         private javax.swing.Timer animationTmr;
         private float heigth;
         private float width;
         private Cursor c;
         public ShapePanel(int w, int h) {
                    int W=w;
                    int H=h;
                    c = new Cursor (Cursor.CROSSHAIR_CURSOR);     //Change cursor to cross hair
                    this.setCursor (c); 
                    this.setPreferredSize(3000,3000);
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              g.fillRect(0, 0, this.getWidth(), this.getHeight());
        private void setPreferredSize(int i, int i0) {
        thanks

    sorry i hope this is better
    package help;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public abstract class MyFrame extends JFrame {
    private static final long serialVersionUID = 1L;
    int dr =1;
    int dy= 1;
    int Selection=0;
    int width = java.awt.Toolkit.getDefaultToolkit().getScreenSize().width;  // screen width
    int height = java.awt.Toolkit.getDefaultToolkit().getScreenSize().height-100;     //screen higth
    private static ShapePanel bpnl;
    public MyFrame()
            JFrame frame=new JFrame();
            BorderLayout layout=new BorderLayout();
            frame.setLayout(layout);
            bpnl = new ShapePanel(3000,3000);
            System.out.println("panel width = "+bpnl.getWidth() +"  heigth = " + bpnl.getHeight());
            bpnl.setFocusable(true);
              frame.add(bpnl);
            frame.setSize(width, height);
               pack();
            frame.setVisible(true);               
    System.out.println("panel width = "+bpnl.getWidth() +"  heigth = " + bpnl.getHeight());
              public static  int getPanelWidth()
                  System.out.println("panel width   "+bpnl.getWidth());
                  return bpnl.getWidth();
              public static  int getPanelHeigth()
                  System.out.println("Panel heigth  " +bpnl.getHeight());
                  return bpnl.getHeight();
              public static void main(String args[])
                  new MyFrame() {};
    package help;
    import java.awt.Cursor;
    import java.awt.Graphics;
    import javax.swing.JPanel;
    class ShapePanel extends JPanel  {
         private static final long serialVersionUID = 1L;
         private Cursor c;
         public ShapePanel(int w, int h) {
                    int W=w;
                    int H=h;
                    c = new Cursor (Cursor.CROSSHAIR_CURSOR);     //Change cursor to cross hair
                    this.setCursor (c); 
                    this.setPreferredSize(3000,3000);
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              g.fillRect(0, 0, this.getWidth(), this.getHeight());
        private void setPreferredSize(int i, int i0) {
       

  • How to send a mail by ckicking the button using java

    hi,
    how to send a mail by clicking the button (like payroll silp in that contain one button if we click that it autometically go through the mail as a attachment) pls frd to me my gmail is [email protected]

    Hi,
    It seems we are doing the homework for you; to make you start with something; look at the sample code below and try to understand it first then put the right values
    to send an email with an attachement.
    import java.awt.BorderLayout;
    import java.awt.event.ActionEvent;
    import java.util.Date;
    import java.util.Properties;
    import javax.activation.DataHandler;
    import javax.activation.FileDataSource;
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Multipart;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMessage;
    import javax.mail.internet.MimeMultipart;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JTextField;
    public class Main {
          * @param args
         public static void main(String[] args) {
              // Create the frame
              String title = "Frame Title";
              JFrame frame = new JFrame(title);
              // Create a component to add to the frame
              JComponent comp = new JTextField();
              Action action = new AbstractAction("Button Label") {
                   // This method is called when the button is pressed
                   public void actionPerformed(ActionEvent evt) {
                        System.out.println("sending email with attachment");
                        sendEmail();
              // Create the button
              JButton button = new JButton(action);
              // Add the component to the frame's content pane;
              // by default, the content pane has a border layout
              frame.getContentPane().add(comp, BorderLayout.SOUTH);
              frame.getContentPane().add(button, BorderLayout.NORTH);
              // Show the frame
              int width = 300;
              int height = 300;
              frame.setSize(width, height);
              frame.setVisible(true);
         protected static void sendEmail() {
              String from = "me@localhost";
              String to = "me@localhost";
              String subject = "Important Message";
              String bodyText = "This is a important message with attachment";
              String filename = "c:\\tmp\\message.pdf";
              Properties properties = new Properties();
              properties.put("mail.stmp.host", "localhost");
              properties.put("mail.smtp.port", "25");
              Session session = Session.getDefaultInstance(properties, null);
              try {
                   MimeMessage message = new MimeMessage(session);
                   message.setFrom(new InternetAddress(from));
                   message.setRecipient(Message.RecipientType.TO, new InternetAddress(
                             to));
                   message.setSubject(subject);
                   message.setSentDate(new Date());
                   // Set the email message text.
                   MimeBodyPart messagePart = new MimeBodyPart();
                   messagePart.setText(bodyText);
                   // Set the email attachment file
                   MimeBodyPart attachmentPart = new MimeBodyPart();
                   FileDataSource fileDataSource = new FileDataSource(filename) {
                        @Override
                        public String getContentType() {
                             return "application/octet-stream";
                   attachmentPart.setDataHandler(new DataHandler(fileDataSource));
                   attachmentPart.setFileName(filename);
                   Multipart multipart = new MimeMultipart();
                   multipart.addBodyPart(messagePart);
                   multipart.addBodyPart(attachmentPart);
                   message.setContent(multipart);
                   Transport.send(message);
              } catch (MessagingException e) {
                   e.printStackTrace();
    }The sample above is not ideal so you need to go through it and start to ask me some questions if you have
    Let me know if you miss something
    Regards,
    Alan Mehio
    London,UK

  • Record not inserting into the table through Forms 10g

    Hi all,
    I have created a form in 10g(10.1.2.0.2) based on just one table that has 4 columns(col1, col2, col3, col4).
    Here col1, col2 and col3 are VARCHAR2 and col4 is date and all the columns are not null columns(There are no primary and foriegn key constrains, which means duplicates are allowed).
    My form contains 2 blocks where block 1 has one text item (col1) and 3 buttons (Delete, Save, Exit).
    And block2 is a database block and has col2,col3,col4 which are in tabluar layout frame displaying 10 records.
    When the form is opened the cursor has to be in block1.col1 for querrying. Here i enter a value in col1, and then when I click on col2 in the block2, then I put execute_query in new_block_instance of block2, which displays the records.
    The block2 properties are not updatable, insertable and query is allowed.
    Everything is working good until here. But here in the block2 when I want to insert another record into the table, by navigating all the way down to the last empty record and entering the new values for col2, col3 and col4 And then Ctrl+S will display the message "*FRM-40400: Transaction complete: 1 record applied and saved.*" But actually the record is not inserted into the table.
    I also disabled the col4 by setting the Enabled property to No, since while inserting new record the date have to be populated into it and it shouldnt be changed by the user. And im populating the sysdate into the new record by setting Intial Value property to *$$DATE$$*.
    And another requirement which I could not work arround here is that, the col3 also should be populated with the username of the user while inserting.
    please help me...

    Hi Sarah,
    I do not want to update the existing record. So I kept Udate Allowed to No in property palette for the items in block2.
    Do I have to do this property at block level also?
    I'm inserting a new record here.
    Edited by: Charan on Sep 19, 2011 8:48 AM

  • I want to adjust the column width of "From", "Subject" and "Date". in the AT&T email within Firefox browser

    My computer runs under Windows Vista Home Premium, and Firefox browser 3.6.13. Within the Firefox browser, it shows an AT&T email window (www.sbc.yahoo.com). There are several columns such as subject, date, etc. I was able to adjust such column width before. Now I cannot do it. (Also I can adjust column width if I run in the Internet Explorer. I have another computer running Window 7 professional, same set up with Fire Fox and AT&T email, I am able to adjust the column width so I can show the full subject line.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    You can also try to set the pref layout.frames.force_resizability to true on the about:config page.
    See also http://kb.mozillazine.org/about%3Aconfig

  • Change background color  for JFrame

    hi,
    i want to change background color of JFrame. In my application i didn't create any panels.
    my code like this,
    Frame myFrame = new JFrame ( " Grid Layout Frame ");     
    myFrame.setSize(500,500);     
    myFrame.getContentPane().setBackground(Color.white);
    myFrame.setVisible(true);thanks,
    Balaji

    You don't get a white frame when you run this program?import java.awt.*;
    import javax.swing.*;
    public class junk
         public static void main(String[] args) throws Exception
              JFrame f = new JFrame("Hello");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.setSize(500,500);
              f.getContentPane().setBackground(Color.white);
              f.setVisible(true);
    }

  • Thread problem in swing application?

    Hi,
    I have a doubt in GridLayout and Threads. I�m doing one small application which is accepting images and Alphabets. Actually, What I�m doing running images and alphabets(combinedly) in frequent intervals. For this I used GridLayout and Thread concept. But I have a problem in paint method. How to call the GridLayout frequently. In GridLayout , I�m putting Images and alphabets. Acutually in paint method , there are only drawString or drawImage or other methods. Is it possible to call my layout. Is so, can anybody help me in this regard. Is there any way to do it . please suggest me.
    Thanks,
    -Balaji
    My code follows:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    import java.awt.Color;
    import javax.swing.*;
    import java.applet.Applet;
    import java.util.*;
    import java.io.*;
    public class GridLayEx2 extends Applet implements Runnable {
    private Random r = new Random();
    private Thread imageThread = null;
    GridLayout glt;
    public void init() {
    glt = new GridLayout(3,3);
    setLayout(glt);
    } // end of init method
    public void start(){
    if (imageThread == null) {
    imageThread = new Thread(this, "GridLayEx2");
    imageThread.start();
    } // end of start method
    public void run(){
    Thread myThread = Thread.currentThread();
    while (imageThread == myThread) {
    repaint();
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e){ }
    }// end of run method
    public void paint(Graphics g){
    Font boldFont = new Font("Helvetica", Font.BOLD, 25);
    Font plainDerived =
    boldFont.deriveFont(Font.PLAIN, 25);
    JLabel myLabel[] = new JLabel[9];
    String myUrl = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\duke1.gif";
    myLabel[0] = new JLabel(new ImageIcon(myUrl));
    myLabel[1] = new JLabel("A");
    myLabel[2] = new JLabel("A");
    myLabel[3] = new JLabel("A");
    myLabel[4] = new JLabel("A");
    myLabel[5] = new JLabel("A");
    myLabel[6] = new JLabel("A");
    myLabel[7] = new JLabel("A");
    myLabel[8] = new JLabel("A");
    myLabel[1].setFont(boldFont);
    myLabel[2].setFont(boldFont);
    myLabel[3].setFont(boldFont);
    myLabel[4].setFont(boldFont);
    myLabel[5].setFont(boldFont);
    myLabel[6].setFont(boldFont);
    myLabel[7].setFont(boldFont);
    myLabel[8].setFont(boldFont);
    int values[] = new int[9];
    values = gen_pos_uni_ran_num(0,8);
    for(int i = 0; i < 9; i++)
    add(myLabel[values]);
    } // end of paint method
    public void stop(){
    imageThread = null;
    } // end of stop method
    public int[] gen_pos_uni_ran_num(int min, int max)
    int results[] = new int[Math.abs(max - min) + 1];
    for(int i = 0; i < results.length; ++i)
    results = -1;
    outer_loop:
    for(int i = 0; i < results.length; ++i)
    int random_int = (int)((Math.random() * results.length) + min);
    for(int j = 0; j < results.length; ++j)
    if(results[j] == random_int)
    random_int = (int)((Math.random() * results.length) + min);
    j = -1;
    continue;
    if(j == results.length - 1)
    results = random_int;
    continue outer_loop;
    return results;
    } // generate unique random numbers
    public static void main( String args[])
    Frame GridLayFrame = new Frame ( " Grid Layout Frame ");
    GridLayEx2 gl = new GridLayEx2();
    gl.init();
    GridLayFrame.add(gl);
    GridLayFrame.pack();
    GridLayFrame.setSize(GridLayFrame.getPreferredSize());
    GridLayFrame.show();
    GridLayFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    } // end of main method

    hi,
    i got one doubt in the previous application. i want to put labels in the circle manner while changing my label positions. Now it is rectangular type. And also i want to change my background color of JFrame. Please see my code ...
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.Graphics;
    import java.awt.Color;
    import javax.swing.*;
    import java.util.*;
    import java.io.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.util.GregorianCalendar;
    public class GridLayEx6 extends JApplet{ 
       private Random r = new Random(); 
       private ActionListener taskPerformer;
       private javax.swing.Timer timer;  
       private GridLayout glt;  
       private JLabel[] myLabel;     
       GregorianCalendar todayDate = new GregorianCalendar();     
       long fromTime,toTime,elapsedTime;
       public void init() {     
            glt = new GridLayout(3,3);     
          Font boldFont = new Font("Helvetica", Font.BOLD, 25);     
          Font plainDerived = boldFont.deriveFont(Font.PLAIN, 25);     
             myLabel = new JLabel[9];     
             String myUrl = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\MyArrow.jpg";
             String myUrlA = "C:\\Regoti\\Vision\\AP\\Project\\Version1\\images\\MyA.jpg";     
             URL url = null;     
       try{
       myLabel[0] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);     
       myLabel[1] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[2] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[3] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[4] = new JLabel("+", SwingConstants.CENTER);     
       myLabel[5] = new JLabel(new ImageIcon(myUrlA), SwingConstants.CENTER);
       myLabel[6] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[7] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[8] = new JLabel(new ImageIcon(myUrl), SwingConstants.CENTER);
       myLabel[2].setVerticalAlignment(SwingConstants.NORTH);     
       myLabel[4].setFont(boldFont);     
       getContentPane().setLayout(glt);     
      } catch( Exception e)
        { System.out.println(" Exception occurs "+e);}
       int delay = 20000; //milliseconds     
       ActionListener taskPerformer = new ActionListener() {     
       public void actionPerformed(ActionEvent evt) {      
                 randomDuke();
       timer = new javax.swing.Timer(delay, taskPerformer);     
       addKeyListener(new KeyAdapter()      {        
          public void keyPressed(KeyEvent e){           
                 GridLayEx6 gl2 = (GridLayEx6)e.getSource();           
                     switch(e.getKeyCode())
                           case(KeyEvent.VK_ENTER): 
                                gl2.randomDuke();                 
                                break;
                       case(KeyEvent.VK_SPACE):              
                            if(gl2.timer.isRunning())                    
                              { gl2.timer.stop();                 
                                    toTime = System.currentTimeMillis();
                                 elapsedTime = toTime - fromTime;
                                 System.out.println("toTime : "+toTime);
                                 System.out.println("elapsedTime : "+elapsedTime);
                                  gl2.timer.start();
                                   gl2.randomDuke();
                               break;
                       case(KeyEvent.VK_KP_RIGHT):case(KeyEvent.VK_KP_UP):              
                       case(KeyEvent.VK_RIGHT):case(KeyEvent.VK_UP):              
                         int delay = gl2.timer.getDelay();
                         if(delay > 0)                    
                            gl2.timer.setDelay(delay - 100);                 
                            break;
                       case(KeyEvent.VK_KP_LEFT):case(KeyEvent.VK_KP_DOWN):              
                       case(KeyEvent.VK_LEFT):case(KeyEvent.VK_DOWN):
                            int delay = gl2.timer.getDelay();                  
                            if(delay < 10000)                    
                                 gl2.timer.setDelay(delay + 100);                  
                                 break;
                       //timer.start();  
             } // end of init method  
             public void start()   {     
                  timer.start();     
                    while(!isFocusOwner())        
                            requestFocus(); 
             } // end of start method     
             public void stop(){    
                  timer.stop();
            } // end of stop method     
             /** To make sure we have focus in application *  
             * mode if JFrame loses focus control          *  
             * - non standard usage of paintComponent      */    
             public void paintComponent(Graphics g)   {
                  while(!isFocusOwner())        
                       requestFocus();  
            public void randomDuke()   {     
                  fromTime = System.currentTimeMillis();
                  System.out.println("fromtime : "+fromTime);     
                  getContentPane().removeAll();     
                  int[] values = new int[9];     
                  int temp;
                  values = gen_pos_uni_ran_num(0,8);     
                  for ( int i=0; i<=8;i++)
                          if ( values[i] == 4)
                                 temp = 4;
                                 values[i] = values[4];
                                 values[4] = temp;
                  for(int q = 0; q < 9; q++)   
                        getContentPane().add(myLabel[values[q]]);    
                       myLabel[0].revalidate();
                       myLabel[1].revalidate();
                       myLabel[2].revalidate();
                       myLabel[3].revalidate();
                       myLabel[5].revalidate();
                       myLabel[6].revalidate();
                       myLabel[7].revalidate();
                       myLabel[8].revalidate();
                    } // end of randomDuke method  
              public int[] gen_pos_uni_ran_num(int min, int max)   {     
                  int results[] = new int[Math.abs(max - min) + 1];     
                  for(int q = 0; q < results.length; ++q) 
                       results[q] = -1;     
                  outer_loop:     
                  for(int q = 0; q < results.length; ++q)  
                       int random_int = (int)((Math.random() * results.length) + min);        
                    for(int j = 0; j < results.length; ++j)       
                        if(results[j] == random_int)            {              
                            random_int = (int)((Math.random() * results.length) + min);              
                            j = -1;
                      continue;           
                     if(j == results.length - 1)
                          results[q] = random_int;              
                          continue outer_loop;
                  return results;  
                  } // generate unique random numbers  
                  public static void main( String args[])
                        JFrame GridLayFrame = new JFrame ( " Grid Layout Frame ");     
                       GridLayFrame.setSize(500,500);     
                       GridLayEx6 gl = new GridLayEx6();     
                       gl.init();     
                       GridLayFrame.getContentPane().add(gl);     
                       //GridLayFrame.setBackgroundColor(Color.white);
                       GridLayFrame.setVisible(true);
                       gl.start();     
                       GridLayFrame.addWindowListener(new WindowAdapter()      
                         public void windowClosing(WindowEvent e)         
                        System.exit(0);         }      });  
                  } // end of main method
                  }

  • Photos Are Too Big

    Good morning.
    I've just started exploring the possibility of making a photo album in iPhoto. When I place a photo on a full page, the photos are too big for the 'frame'- that is, the frame crops part of my photos off. I have tried using the resizing tool but find that the photos are already resized to their smallest.
    Is there another way to deal with this problem?
    Thanks,
    BurntMonkey

    John:
    iPhoto puts up that warning when the resolution of the image falls below 180 dpi. A lot would depend on how far it falls below. They will not appear as good as they do on screen but that goes for all of the photos. The monitor display usually has more contrast and snap than the printed version. But that's not to mean the printed version doesn't or won't look good.
    You can approximate the dpi of the photo for the frame that's giving the warning. The pages are 8.5 x 11. Estimate the size of the frame and divide the frame's dimension into the pictures corresponding pixel dimension.
    What are the pixel dimensions of a typical photo that's giving you the warning sign and what page layout/frame are the in?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier versions) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. There are versions that are compatible with iPhoto 5, 6, 7 and 8 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    NOTE: The new rebuild option in iPhoto 09 (v. 8.0.2), Rebuild the iPhoto Library Database from automatic backup" makes this tip obsolete.

  • Sockets problem HELP!!

    I am trying to create a peer-to-peer messager using Sockets. I have a Listener class that listens for connections and accepts them and creates a new socket for each connection and also calls a ChatHandler which is passed the new socket. Exept the StartConv class which connects to the listener class initially never finds out about the new Socket and thinks it is still connected to the listener port :(( Here is some of the code i am trying to use for each of the classes:-
    Listener
    public class Listener implements Runnable {
      public void run () {
      try{
      listen();
    }catch(Exception e){
    System.out.println("Error in listener:"+e );
      public static void listen() throws IOException{
        int port = 4444;
        ServerSocket server = new ServerSocket (port);
        try{
        System.out.println("Listening...");
             while (true) {
             System.out.println("Listening...11");
             Socket client = server.accept ();
             System.out.println ("Accepted from " + client.getInetAddress ());
             ChatHandler handler = new ChatHandler (client);
             handler.start ();
      }catch (IOException ex){
      System.out.println("Error in listener"+ex);
    ChatHandler
    public class ChatHandler extends JFrame implements Runnable {
      protected Socket socket;
      public ChatHandler (Socket socket) {
        this.socket = socket;
      protected DataInputStream dataIn;
      protected DataOutputStream dataOut;
      protected Thread listener;
      public void start () {
      System.out.println("Entered ChatHandler.start()");
          try {
            dataIn = new DataInputStream
              (new BufferedInputStream (socket.getInputStream ()));
            dataOut = new DataOutputStream
              (new BufferedOutputStream (socket.getOutputStream ()));
            listener = new Thread (this);
            listener.start ();
            run();
          } catch (IOException ignored) {
      public synchronized void stop () {
        if (listener != null) {
          try {
            if (listener != Thread.currentThread ())
              listener.interrupt ();
            listener = null;
            dataOut.close ();
          } catch (IOException ignored) {
      public void run () {
      System.out.println("Entered ChatHandler.run()");
    try{
            String message = dataIn.readUTF ();
       }catch(IOException e) {   
       System.out.println("Problem receiving message: dataIn.readUTF");
            String title = "Conversation from "+socket.getInetAddress();
        JFrame cframe = new JFrame(title);
        // Create a component to add to the frame
        JPanel top=new JPanel();
        JPanel bottom=new JPanel();
        TextArea conv = new TextArea(10,75);
        TextArea msg = new TextArea(8,75);
    top.add(conv);
    bottom.add(msg);
        // Add the component to the frame's content pane;
        // by default, the content pane has a border layout
        cframe.getContentPane().add(top, BorderLayout.NORTH);
        cframe.getContentPane().add(bottom, BorderLayout.CENTER);
        // Show the frame
        cframe.setSize(600, 500);
        cframe.setVisible(true);
        stop ();
    StartConv
    public abstract class StartConv extends JFrame implements Runnable {
    public static void run (String userip){
    try{
    connect(userip);
    }catch(Exception e){
    System.out.println("Error in StartConv:"+e);
    showframe();
    public static void showframe(){
    String title = "Frame Title";
        JFrame frame = new JFrame(title);
        // Create a component to add to the frame
        JPanel top=new JPanel();
        JPanel bottom=new JPanel();
        TextArea conv = new TextArea(10,75);
        TextArea msg = new TextArea(8,75);
    top.add(conv);
    bottom.add(msg);
        // Add the component to the frame's content pane;
        // by default, the content pane has a border layout
        frame.getContentPane().add(top, BorderLayout.NORTH);
        frame.getContentPane().add(bottom, BorderLayout.CENTER);
        // Show the frame
        frame.setSize(600, 500);
        frame.setVisible(true);
      protected DataInputStream dataIn;
      protected DataOutputStream dataOut;
      protected Thread listener;
    public static void connect (String userip) throws IOException {
          String host=userip;
          int port=4444;
          Socket socket = new Socket (host, port);
          try {
             DataInputStream dataIn = new DataInputStream
              (new BufferedInputStream (socket.getInputStream ()));
             DataOutputStream dataOut = new DataOutputStream
              (new BufferedOutputStream (socket.getOutputStream ()));
          } catch (IOException ex) {
            socket.close ();
            throw ex;
          Thread listener = new Thread ();
          listener.start ();
      }

    It says at the top :) think i posted too much code but that way everyone knows exactly what is happening. Cant get the StartConv class to commmunicate with the ChatHandler basically

  • Writing and loading Object

    Hello, I've been trying to save and load back in an Object File by using Object Serialization and ObjectOutputStream and ObjectInputStream. Everything works without casting any exceptions except when I load the fiel back in, it is null. I don't know why. I am actually trying to load a certain Class (which I named SaveGUI) that I have created and that contains many different Objects within itself and they are all Serializable. Now, to use the method readObject(), I guess the object has to be an instance of class Object so I tried extending SaveGUI to Object, It still didn't work.
    Can anyone give me some hints on what the problem could be?
    This is some of the code:
    FileDialog d = new FileDialog(GUI.this, "Save GUI State", FileDialog.SAVE);
    d.show(); // display the dialog and block until answered
    String filename = d.getFile(); // Get the user's response
    if (filename != null) {           // If user didn't click "Cancel."
    try {
    // Create the necessary output streams to save the Object.
    File f = new File(d.getDirectory(), filename); // Create a file object
    ObjectOutputStream out = new ObjectOutputStream(
    new java.util.zip.GZIPOutputStream(
    new FileOutputStream(f))); // Save objects
    out.writeObject((SaveGUI)saveGUI); // Write the entire Object.
    out.flush(); // Always flush the output.
    out.close(); // And close the stream.
    // Print out exceptions.
    catch (IOException ioe) { System.out.println("I/O Exception in file writing: "+ioe); }
    // Open up a dialog for the user to choose the file
    FileDialog d = new FileDialog(GUI.this, "Load a Saved GUI State", FileDialog.LOAD);
    d.show(); // display the dialog and block until answered
    String filename = d.getFile(); // Get the user's response
    if (filename != null || (filename.length() != 0)) {    // If user didn't click "Cancel."
    try {
    // Create the necessary input streams to load the GUI.
    File f = new File(d.getDirectory(), filename); // Create a File object
    ObjectInputStream in = new ObjectInputStream(
    new java.util.zip.GZIPInputStream(
    new FileInputStream(f))); // Read Object.
    SaveGUI obj = (SaveGUI)in.readObject(); // Assign Object.
    //in.close(); // And close the stream.
    // Print out exceptions.
    catch (IOException ioe) { System.out.println("I/O Exception in file loading: "+ioe); }
    public class SaveGUI extends java.lang.Object implements java.io.Serializable {
    public SaveGUI() {}
    Vector xAxisDataTable = new Vector(); // For each Frame there is a x-Axis DataTable
    Vector yAxisDataTable = new Vector(); // for each x-Axis column there is a y-Axis DataTable
    Vector titlexAxis = new Vector(); // The title of the xAxis (Vector of Strings)
    Vector titleyAxis = new Vector(); // (Vector of Strings)
    Vector plotsRecord = new Vector(); // Plotting Records of columns in x-Axis List (PlotRecord-s)
    Vector plotsOptions = new Vector(); // Plotting Options, for each layout frame (PlotOptionsFrame)
    }

    I solved it, don't worry

Maybe you are looking for

  • **dir sync major issues urgent please**

    our dir sync is not working correctly the last sync was over 6 hours ago - all settings are fine i ran the force utility Import-Module DirSync and Start-OnlineCoexistenceSync but no joy the azure directory C:\Program Files\Windows Azure Active Direct

  • Pavilion dm4 1150ea Blutooth not working

    Hi I have Pavilion Laptop dm4 1150ea.  Blutooth on this is not working and frankly since buying the laptop I did not try connecting devices through bluetooth. Recently I tried this but not succeeded. When I add a device in blutooth window, it shows a

  • Trig Functions

    Ok, I've been trying to to find a way of using trig functions in my code, but I've been having nothing but problems. I've been using the henson Float class, available at: http://henson.newmail.ru/j2me/Float.htm But the answers it gives me for the cos

  • How to reindex the WSUS database 3.0sp2

    Good Day, It has come to my attention that MS released a new update KB2938066 which increase security.  The recommendation is to run Server Cleanup Wizard (which I did) and then reindex the WSUS database which I have a question on. I am running Windo

  • AE - Assign Mitigating Controls when Submitting Request?

    With AE 5.1, can you assign mitigating controls when submitting a request?  In the "Configuration tab":  for the "Risk Analysis" Configuration option, if you select "Perform Risk Analysis on request submission" to Yes: Does the requestor have the opt