How to set Borderlayout?

Hi all,
I used BorderLayout in JPanel. I have added JTextArea at CENTER and JList at EAST.
Jpanel is in JFrame.
The size of JList is depend on Element that longest but when I remove all element and try to
resize JFrame, the JList which has no element extend its size to half of frame.
The point is How can I set size of Jlist to extend depending on Frame size.
Or Can I fix the size of Jlist in BorderLayout.
Help...please

Sizing problems can usually be solved by setting the correct preferred, minimum and maximum size.
In your case try to set the maximumSize to a very big one (e.g. 32678, 32768)
If that still doesn't help you might want to look into a different LayoutManager.
Thomas

Similar Messages

  • How to set components aligned in left when we use BorderLayout

    Hello All,
    How to set the components aligned in the left when we use BorderLayout in a panel.Right now,the components are getting aligned in the center.
    Any solutions?
    Thanks in advance,
    Vijay

    By default a JPanel uses a FlowLayout when created and by default a FlowLayout uses center alignment. Read the FlowLayout API to find out how to use left alignment.
    Also each individual component has an alignmentX and alignmentY value which is set to 0.5 (center aligned). Some LayoutManagers will take this value into consideration. Read the Component API for more information.
    Also, check out this section from the Swing tutorial on "Using Layout Managers":
    http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html

  • How to set the background for all components?

    hi
    Does anybody know how to set the DEFAULT background color in an application.. I need it because in jdk 1.3 the default bgcolor is grey and in 1.5 it is white.. and I wish white as well.. so to make it also white in jdk 1.3 I need to use the (a bit annoying) anyContainer.setBackground( Color.white ); and these are lots in my app.. So my question is: is there such an overall class with a function (say UIManager.setComponentsBackground( Color color ) ) for such a purpose?
    any tip or link would be greatly appreciated

    Does anybody know how to set the DEFAULT background color in an applicationthis might get you close
    import java.awt.*;
    import javax.swing.*;
    import java.util.Enumeration;
    class ApplicationColor extends JFrame
      public ApplicationColor()
        setApplicationColor(Color.RED);
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel jp = new JPanel(new BorderLayout());
        jp.add(new JTextField("I'm a textfield"),BorderLayout.NORTH);
        jp.add(new JComboBox(new String[]{"abc","123"}),BorderLayout.CENTER);
        jp.add(new JButton("I'm a button"),BorderLayout.SOUTH);
        getContentPane().add(jp);
        pack();
      public void setApplicationColor(Color color)
        Enumeration enum = UIManager.getDefaults().keys();
        while(enum.hasMoreElements())
          Object key = enum.nextElement();
          Object value = UIManager.get(key);
          if (value instanceof Color)
            if(((String)key).indexOf("background") > -1)
              UIManager.put(key, color);
      public static void main(String[] args){new ApplicationColor().setVisible(true);}
    }

  • How to set  up the loop?

    I am trying to create a Frame, using BorderLayout and every time we click the center button, it will change the color in one of the region. But I dont know how to set up the loop to make it change one at a time. Below is my draft......Thanks for helping.......
    Test.java
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends Applet implements ActionListener
              Color []color={Color.red,Color.blue,Color.black,Color.green};
              private Button nb=new Button("North Button");
              private Button sb=new Button("South Button");
              private Button eb=new Button("East Button");
              private Button wb=new Button("West Button");
              private Button cb=new Button("Center Button");
              int buttonCount=0;
              public void init()
                   setLayout(new BorderLayout());
                   add(nb,"North");
                   add(sb,"South");
                   add(eb,"East");
                   add(wb,"West");
                   add(cb,"Center");
                   cb.addActionListener(this);
                   buttonCount=0;
              public void actionPerformed(ActionEvent e)
                   for (int i=0;i<color.length;i++)
                        buttonCount++;
                        if (buttonCount%2==0)
                             nb.setBackground(color);
                        if (buttonCount%2==1)
                             sb.setBackground(color[i]);

    declare a public variable count;
    int count=0;
    public void actionPerformed(ActionEvent e)
    buttonCount++;
    count++;
    if(count==color.length)
    count=0;
    if (buttonCount%2==0)
    nb.setBackground(color[count]);
    if (buttonCount%2==1)
    sb.setBackground(color[count]);
    hope you got it.

  • How to set the size of a JTabbedane to the size of the frame

    I have a tabbed pane in a frame, I would like to know how to set the size of the tabbed pane, so that it occupies the whole of the frame which has been set to screen size.
    Thanks

    Is it not possible to use it with a GridBagLayout?Your question was "How do I get a tabbed pane to take all the space of the frame"?
    You where given the answer. Did you try it? Did it work? Then why are you questioning the suggestion?
    Its one line of code if you use a BorderLayout which by the way was specifically designed for this purpose.
    Yes you can do it with a GridBagLayout with about 5 lines of code.
    So the question is why would you want to write 5 lines of code when you can use one?
    If your question was "How do I waste my time forcing the GridBagLayout to size a component to take up all the space of the frame", then you would have received a different answer. (Although most people would have told you to use a BorderLayout anyway, since its easier).

  • How to set the frame size?

    Hi,
    Can some one show me how to set the frame size in this program? History: I have created a window and added a button but its to small. So I want to increase the size of the frame to at least 600X400 pixel.
    private static void showGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("ButtonDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Main newContentPane = new Main();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        }It would be nice if you could show me how to do it.
    Thank you very much for reading this.

    Challenger wrote:
    Simply adding
    frame.setSize(new Dimension(600,400));to the end of your code should work perfectly.Or, if you want to do it correctly, .setPreferredSize() on your frame before you .pack() it. The default layout manager for JFrame is BorderLayout, which uses the preferredSize of each component to calculate sizes during the .pack() call.

  • How to set a Swing component as Modal window on a SWT Component.?

    How to set a Swing component as Modal on a SWT Component.I mean, I have a window (SWT Container) with some menu items.
    When I click on one menu item then i will get one new Swing Window.
    When creating the new frame I had passed Modal value as TRUE in the constructer.Now child is not behaving as Modal Window.I mean I am able to go to parent window even though the child window is opened as a Modal Window.This is only happened when I double click on the Title Bar of the Parent Window.
    If I try to click on any other part of the Parent Window except Title bar ... the child window is working as a Modal Window.
    Can any one suggest me to solve this one !!

    int this case, do this :
    JFrame f = new JFrame("Authentification");
    f.getContentPane().setLayout(new BorderLayout());
    f.getContentPane().add(myJPanel, BorderLayout.CENTER);
    f.setBounds(x,y,w,h);
    f.setVisible(true);
    Where myJPanel is the Panel you developped.

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • How to set image to JPanel

    Hi to all,
    How to set background image to panel in swing?
    If anyone knows tell me..

    Hi,
    Just modify and use this..
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import javax.swing.JCheckBox;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JViewport;
    import RboJComponents.RboJEmailTextField;
    import RboJComponents.RboJPanel;
    public class ImagePanel extends JPanel
    public static final int TILED = 0;
    public static final int SCALED = 1;
    public static final int ACTUAL = 2;
    private BufferedImage image;
    private int style;
    private float alignmentX = 0.5f;
    private float alignmentY = 0.5f;
    public ImagePanel(BufferedImage image)
    this(image, TILED);
    public ImagePanel(BufferedImage image, int style)
    this.image = image;
    this.style = style;
    setLayout( new BorderLayout() );
    public void setImageAlignmentX(float alignmentX)
    this.alignmentX = alignmentX > 1.0f ? 1.0f : alignmentX < 0.0f ? 0.0f : alignmentX;
    public void setImageAlignmentY(float alignmentY)
    this.alignmentY = alignmentY > 1.0f ? 1.0f : alignmentY < 0.0f ? 0.0f : alignmentY;
    public void add(JComponent component)
    add(component, null);
    public void add(JComponent component, Object constraints)
    component.setOpaque( false );
    if (component instanceof JScrollPane)
    JScrollPane scrollPane = (JScrollPane)component;
    JViewport viewport = scrollPane.getViewport();
    viewport.setOpaque( false );
    Component c = viewport.getView();
    if (c instanceof JComponent)
    ((JComponent)c).setOpaque( false );
    super.add(component, constraints);
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if (image == null ) return;
    switch (style)
    case TILED :
    drawTiled(g);
    break;
    case SCALED :
    Dimension d = getSize();
    g.drawImage(image, 0, 0, d.width, d.height, null);
    break;
    case ACTUAL :
    drawActual(g);
    break;
    private void drawTiled(Graphics g)
    Dimension d = getSize();
    int width = image.getWidth( null );
    int height = image.getHeight( null );
    for (int x = 0; x < d.width; x += width)
    for (int y = 0; y < d.height; y += height)
    g.drawImage( image, x, y, null, null );
    private void drawActual(Graphics g)
    Dimension d = getSize();
    float x = (d.width - image.getWidth()) * alignmentX;
    float y = (d.height - image.getHeight()) * alignmentY;
    g.drawImage(image, (int)x, (int)y, this);
    public static void main(String [] args)throws Exception
    BufferedImage image = javax.imageio.ImageIO.read(new java.io.File("c:\\final.jpg"));
    //ImagePanel north = new ImagePanel(image, ImagePanel.ACTUAL);
    //north.setImageAlignmentY(1.0f);
    //JTextArea text = new JTextArea(5, 40);
    //JScrollPane scrollPane = new JScrollPane( text );
    //north.add( scrollPane );
    ImagePanel south = new ImagePanel(image, ImagePanel.SCALED);
    south.setPreferredSize(new Dimension(490, 340));
    south.setLayout(null);
    RboJPanel buttons = new RboJPanel();
    buttons.setBounds(15, 105, 350, 50);
    RboJEmailTextField toAddress = new RboJEmailTextField(28);
    //toAddress.setBounds(20,20,20,20);
    //toAddress.setCaretColor ( toAddress.getBackground () ) ;
    buttons.add(toAddress);
    //buttons.add(new JButton("Two"));
    /*JPanel boxes = new JPanel();
    boxes.add( new JCheckBox("One"));
    boxes.add( new JCheckBox("Two") );*/
    south.add(buttons);
    //south.add(boxes, BorderLayout.PAGE_END);
    JFrame frame = new JFrame();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //frame.getContentPane().add( north, BorderLayout.NORTH );
    frame.getContentPane().add( south);
    frame.pack();
    frame.setVisible(true);
    }Regards,
    Anees

  • How to set ButtonGroup inactive?

    Hello
    I have 2 buttongroups in a frame. Within each, a number of JCheckBox appear. Based on the choise in Buttongroup 1, the Buttongroup 2 may or may not be nessecary. But how to set the buttongroup inactive?
    Regards
    Jens

    You have to set the checkboxes inactiveimport java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      ButtonGroup bg1 = new ButtonGroup(), bg2 = new ButtonGroup();
      JCheckBox[] rightButtons = new JCheckBox[4];
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        JPanel left = new JPanel(new GridLayout(0,1)), right = new JPanel(new GridLayout(0,1));
        content.add(left, BorderLayout.WEST);
        content.add(right, BorderLayout.EAST);
        for (int i=0; i<5; i++) {
          JCheckBox jb = new JCheckBox((i%2==0?"Enable":"Disable")+"-"+i);
          left.add(jb);
          bg1.add(jb);
          jb.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent ae) {
              boolean flag = ((JCheckBox)ae.getSource()).getText().startsWith("Enable");
              for (int i=0; i<rightButtons.length; i++) {
                rightButtons.setEnabled(flag);
    for (int i=0; i<rightButtons.length; i++) {
    rightButtons[i] = new JCheckBox("Right-"+i);
    right.add(rightButtons[i]);
    bg2.add(rightButtons[i]);
    setSize(300, 300);
    public static void main(String[] args) { new Test3().setVisible(true); }

  • How we set up multiple websites on OSX Server

    BACKGROUND
    After fiddling and futzing around for weeks (actually since last year) I've finally figured out how to set up multiple websites (virtual sites) using one port and one IP address. While there seems to be lots of discussion on this topic, it seems that the basic assumption is that one knows everything about websites, DNS and all that stuff, which I do not.
    When our network was originally established the engineer set up a wiki and also configured webmail, so we had two sites, one secured for mail and the other open for Calendar and the wiki. We were not hosting any websites locally because our school website is hosted by a company in New England.
    This year I wanted to set up websites for teachers and students. As great as the wiki is, there are some things it just can't do as well as a website. So I figured if I set up the sites teachers could link back and forth from one to the other. In addition kids could now start to use a real website instead of the cobbled together file mess I had when we ran a Windows network. Also iWeb is a much more accessible tool than FrontPage.
    SERVER SIDE:
    Snow Leopard Server - 10.6.4
    There are two - actually three pieces if you want your iWeb clients to connect to the server: Server Side Web Services, DNS and, in my case, FTP.
    ================================================ SERVER SIDE - WEB SERVICES
    If you haven't turned on Web services, you'll need to open Server Admin and do that. If you don't know how to set up web services - just reply and I'll step you through that as well.
    Once web services are set up and turned on, you'll see it listed under your server’s name in the Server Admin sidebar. Click on "Web" and then click on the "Sites" tab at the top of page. This is where you list all your sites.
    Click the plus button and enter the fully qualified name of your site, for example: "students.myschool.org". Don't use the defaults here (no name) - that's what got me in trouble before. BE SPECIFIC!
    You'll be looking at the "General" tab (the other tabs, "Options", "Realms", etc. we'll deal with in a second).
    On the "General Tab", the default IP address ("any") and port (80) is just fine. We'll run everything over port 80. (Apache figures all the virtual site stuff out - you don't need your rocket science degree for that.)
    "Web Folder:" is important because this is how you'll "segment" your websites. While I would NEVER do this again, we have a solid state hard drive for the OS and a RAID array for our data files. IF you have that, make sure you do NOT use the default "Web Folder" because it will store all your files on your solid state drive. There may not be enough room, over time, on that drive. I've not experienced it yet, but it's my understanding that if the drive fills up, the server shuts down.
    I store my web sites on a folder on the RAID array.
    Everything else on that tab can be left as the default. (Just make sure that you have an "index.html" or "index.php" file in your web folder root, but iWeb will take care of that for you.)
    I would put in your email address in the "Administrator Email:" field.
    Under "Options" you really don't have to put anything. I've tested making websites with iWeb and it doesn't appear that anything needs to be checked.
    Nothing needs to be entered in "Realms" as well from what I see working w/ iWeb.
    The defaults in "Logging" are fine.
    You can leave "Security" alone, but we do have a (self-issued) certificate listed for our webmail site.
    "Aliases" is important. Under "Web Server Aliases" you enter how you want the site to respond to when users type in a URL in their web browsers.
    When our web server was initially set up the engineer set up "wiki.myschool.org" on port 80 and "mail.myschool.org" on port 443. In the aliases section was nothing but a "*" (the wildcard character). That means, from what I can figure out, that the webserver will respond to these sites regardless of what is typed in the URL. (Well, something like that - point is, if you create OTHER websites, you'll NEVER get to them because the wildcard character in the "Aliases" section, in effect, grabs those web requests and redirects them to the sites that are already there.
    In my case I deleted both of those wild card characters. For my "wiki.myschool.org" site, I entered "mail.myschool.org". That means if you type EITHER "wiki." or "mail.", go to the site that’s stored in the “Web Folder” we set up when those sites were created.
    For "mail.myschool.org" I just DELETED the wildcard character. I wanted that site (since it was secured) only to respond to "mail." - nothing else. (You're not going to that secured site for any other reason than to get your mail.)
    "Proxy" can be left blank. Have no idea what that does. As time permits I'll do some research and figure out what it's used for.
    "Web Services" is if you want to provide any MORE services to this particular site. Most likely you'll want to uncheck all the boxes. For our "wiki." site, we have checked "Wikis", "Blogs", and "Calendar". For our "mail." site we have those checked PLUS "Mail".
    I would create a separate "Web Folder" for each of your sites. I don't know if that's a requirement but for housekeeping purposes, I would keep the sites separated. And I SUSPECT that it's "best practice" to separate your wiki from your other websites.
    SERVER SIDE - DNS
    OK...now you have to make your site reachable and the only way to do that is to set up DNS so that folks don't need to type in the IP address of your web server. You need to set up DNS inside your network and, if you want folks in the outside world to reach your website, you'll need to set up an external DNS as well. I'm going to cover INTERNAL DNS - if you don't know how to set up EXTERNAL DNS - reply or email me and I'll post those instructions.
    Most likely you have already created Zones for you network...all you really need to do is create "Aliases" so that when you type "students.myschool.org" your web browser will know that site resides on IP address XXX.XXX.XXX.XXX.
    If you've set up Zones then you already have a "Machine" setting that translates your server’s name to an IP address and vice versa.
    All you need to do is create an "Alias" (CNAME) record for, in this case, "students". You’ll see the choices for types of records when you click the "Add Record" button.
    There are only two fields to configure for a record: "Alias Name" - in this case "students" and "Destination" - in this case "servername.myschool.org". (You've already entered a machine record that says "servername" = 192.168.1.x.)
    That's it for Internal DNS.
    SERVER SIDE - FTP
    Now you have to get iWeb to communicate with the webserver.
    There are only three ways iWeb will communicate with webservers: MobileMe, Local Folder and FTP Server.
    Local Folder is really only practical if you want to host a website on a laptop (I was blown away initially when I found out that all Macs had a built-in web server - how neat is that?). I think there are some very cool things teachers could do with configuration, and, of course, you wouldn't need to set up any web services on the web server, but that's for another discussion. You need to set up FTP services on the web server.
    Turn on and enable FTP on your webserver.
    You can leave the defaults for "General", "Messages" and "Logging". "Advanced" is the only thing you want to set. I set "Authenticated Users See:" to "Home Folder Only". I set the "FTP Root" to the same root folder in which I plan to store my web sites (/VOLUMES/RAID Array/WebServer/Documents). This setting sets that folder only to be accessible via FTP.
    I would suggest returning to your DNS settings and adding one more "Alias". Set "ftp." to point to your webserver. Why? So folks can edit their sites from home (see below).
    CAVEAT: If you are running FTP on other servers, make sure that the settings here do not conflict with the settings on the other servers. For example, I'm running FTP on my file server so that my scanners can communicate with it. However, I configure my FTP settings by machine name and NOT "ftp.myschool.org".
    ================================================
    CLIENT SIDE - CONFIGURING iWEB
    Now you have to configure iWeb so that it will communicate with your server.
    Click on the "Site" icon so that "Site Publishing Settings" appears.
    Publishing:
    "Publish to:" = "FTP Server"
    You can set the "Site name:" and "Contact email:" to whatever you want. But see below!
    FTP Server Settings:
    "Server address"=ftp.myschool.org (you could also enter in servername.myschool.org or the IP address. However, if you want folks to be able to work on the site from home, you will need to configure external DNS for that. If you use the IP address, you're out of luck for remote access to the site. (You can do it but it's beyond the scope of this discussion.)
    "Username" & "Password" should be your user's network login credentials.
    "Directory/Path" - this is important. Remember, you set your "FTP Root" to be "/VOLUMES/RAID Array/WebServer/Documents". If you leave this field blank then the website will be dumped into this folder. If you are only setting up one site, that may be OK. However I wanted to set up a "students" site folder, a "faculty" site folder and a separate site for our literary magazine.
    THEREFORE: I have, in my ..../Documents folder (on the server), a "students" folder, a "faculty" folder, and a "litmag" folder.
    SO...in my "Directory/Path:" field, I have "/faculty". That means the full path to this website is "ftp root/faculty" or "/VOLUMES/RAID Array/WebServer/Documents/faculty" (You don't need a trailing "/" character. iWeb will automatically append the folder for you user depending on what you entered in "Site Name:" in the "Publishing" area.
    Website URL:
    This is the root website depending on whether it is "students" or "faculty". Since iWeb will append the site name to this root website, I accomplished what I hoped to accomplish in this post (http://discussions.apple.com/message.jspa?messageID=12288561#12288561).
    Faculty sites will be @ http://faculty.myschool.org/username. Students @ http://students.myschool.org/username. PERFECT!
    iWeb is such a GREAT tool - NOW the kids can start using it!
    I want to reiterate that this works for our school but it should work for you as well. There may be better ways to do this but it works for us.
    Hope this has been helpful and you won't have to spend weeks trying to figure this all out by yourself!

    OK...here's how we did it.
    To get access to the website you created from outside your network there are a couple of steps.
    First, you have to have a STATIC IP address from your ISP. If you have a T1 circuit, no problem...you usually get a couple of static IPs you can use. However, if you have a cable modem circuit, most likely you have a dynamic IP address which changes when you connect to the internet. Usually a static IP will cost a bit more because the ISP has to go through a couple of steps to set it up for you. But once you have the address, you now have a way for folks outside your network to connect with you.
    (I’m also assuming that you use a router of some sort through which traffic flows out to the internet and that you aren’t using connection sharing or something like that.)
    The next thing you need to do is have your new static IP address associated with the server on which you are hosting your website. You've probably already done that if your website works inside your network. However, you've associated a private ip (192.168.x.x, etc.) to your web server. That doesn't mean anything to folks on the outside because private IP addresses are just that - private - folks can't access them. (I won't get into VPN because that's a whole other topic.)
    The way you associate your new static IP address to your web server is through some sort of dns application from your ISP. For example, we use TierraNet to manage our external DNS information. They have a web interface control panel that is very similar to the DNS interface for XServer. You can create CNAME records (aliases - other ways that folks can access your servers).
    Basically you create an "A" (CNAME) record with a fully qualified domain name (e.g. webserver.myschool.org) and point it to your public IP address (XXX.XXX.XXX.XXX) which you just got from your ISP. It's going to take a while (24-48 hours) for this change to take effect. BTW, you can create as many “A” records as you want. For example mail.myschool.com and wiki.myschool.com could point to the same place.
    You want to make sure that the fully qualified domain name you enter in the external dns utility matches the name you used when you created your internal dns records on your XServer.
    OK...so now folks can get to your domain - but, remember, you have a private network IP scheme between them and you. You now have to tell your router that when web traffic arrives, allow it inside the network and direct it to your web server.
    Let's say your public IP address is 205.100.112.50 and your web server is 192.168.0.5.
    You have to create, in your router’s "Security Zone" (router companies call them different things) a couple of rules. Usually the first rule is: "Let everything inside the network get out to the web." You've probably already done that if folks inside the network can reach the internet.
    You then have to tell the router to allow web traffic (port 80) into your network AND redirect that traffic to 192.168.0.5.
    We use AdTran routers and they have a web interface which allows you to write "rules" affecting public and private traffic. Public is folks outside the network, private is folks inside.
    AdTran calls them "Security Zones" and you modify those zones with policies.
    So my "Policy" would say, in the above example, redirect traffic from my public IP (205.100.112.50) -> to my web server -> (192.168.0.5).
    THEN you have to modify this policy with what AdTran calls "Traffic Selectors". You've said, OK, you can get in, but WHAT can get in?
    The "Traffic Selector" is written to say: "Permit" "TCP" traffic from 205.100.112.50 only through Port 80. (That's the port that web traffic goes over. If you wanted a secure website, you'd add another traffic selector that opens port 443, for example.)
    I'll tell you I'm no genius when it comes to this. I called AdTran and had them configure my router for me. I told them what I wanted done, they remoted into the router and configured it. But then I could go to the web interface and see what they did and then added rules later on when I wanted, for example, to get access to the network via Apple Remote Desktop or VPN into the network on my iPad.
    I'd bet that your router has a maintenance agreement that includes this service and if it doesn't it should have.
    I did find that I still had issues when I tried to set this up originally and it had to do with the ORDER of the policies. I can’t remember exactly what the issue was, but, effectively one of the policies highjacked traffic before the policy that I wanted got triggered. Simply moving them around in the list fixed that issue. So if you have this set up but still can’t access the site, check the order of your rules.
    I don’t know if that helps or not, but I try to think about this stuff conceptually and then get someone to help me with the details. I work with this stuff so infrequently that I forgot how I did something 6 months or a year ago. I’m in the process of creating a wiki for the school which documents all this stuff, but that’s a major undertaking.
    Cheers,
    John

  • How to set Compatibility Mode for a single site in ie10

    This question was originally posted on the Answers forum -
    http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-to-set-compatibility-mode-for-a-single-site-in/187152e3-142a-4d96-8d1b-af82ef571eec
    I am having problem with getting ie10 to set ie9 compatibility for a single site (sharepoint.contoso.com).
    When I add this website in Compatibility View Settings (Alt > Tools > Compatibility View Settings > 'Add this Website') it adds the domain 'contoso.com' and not the individual website (sharepoint.contoso.com).
    This cause other sites (www.contoso.com) to be configured to use compatibility mode. Because this is a separate site (different web server) to the site sharepoint.contoso.com (sharepoint 2010 server) we need different compatibility settings.
    Using a different example to explain the issue -
    Microsoft has three websites that are different websites created by different developers written in different programming languages and they only work with certain browsers.
    microsoft.com (Website1 created by Developer1) - compatible with ie8/ie9/ie10
    msdn.microsoft.com (Website2 created by Developer2) - compatible with ie8/ie9
    technet.microsoft.com (Website3 website created by Developer3) - compatible only with ie10
    The only thing the three website share is the URL contains 'microsoft.com'.
    Marking 'msdn.microsoft.com' to run in compatibility mode affects the other 2 websites - mainly technet.microsoft.com which will not work now since it only runs in pure ie10 mode. 
    Should you be able to add an individual site to the compatibility list instead of all sites that have  .microsoft.com in the URL? Am I missing a simple setting in the ie10?
    As a workaround I am using the F12 Developer Tools to set the Browser Mode which temporary sets the compatibility mode. However this is not a nice solution to the end users at our organisation. 

    problem is not solved for non corporate environments...
    You could start your own thread.  Then if you got that answer and it was marked Answered you would have the ability to unmark it.  The OP of this one seems satisfied.  Also note that this is TechNet.  Consumers can get help on Answers
    forums.
    Robert Aldwinckle
    Oh! I wrote it wrong: I should have said: This is not solved for NON-AD environments. No demands what so ever to use Window 7/8 professional in a small corporation or on a big corporation with Island of smaller departments for example offshore.
    The problem is that the thread is not "Answered" by the OP, its is marked answered by a moderator (and same moderator that did the answer) so no way of telling if the OP is satisfied.
    But you are right in the fact that I am almost kidnapping the thread. But a complete answer would benefit all in this case I would presume.
    Regards
    /Aldus

  • Once and for all: How to set up and use SSH

    Yes, I know ssh has been discussed on and off, but never in its entirety; and yes, there are step by step instructions on the www, but at one point or another they skip a crucial instruction that would be necessary for unix-dummies (e.g. how to save and close the nano-editor in Terminal). So, please pardon my question:
    There are several points I'd like to ask for ssh-connecting two macs on a local network:
    1) In terminal-file-"connect to server" you can ask for an ssh connection to be set up. For this to work, do I need to create private and public keys first? If so, how? Please point me to a reliable and step-by-step instruction site.
    There are some free ssh-utilities out there, but their documentation is just not helpful enough for a UNIX-dummy.
    2) Apparently I managed to connect via ssh once (from the terminal, see point 1) to a local server (allowing remote connection set to ON at the server). But then, when I connected to that server from the client's finder and tried to get into my user account on that server it told me that no secure connection could be established. What's wrong here? Do I have to continue working from within the terminal to use this connection? That would be difficult for an average MacUser.
    3) What is the security advantage of an SSH connection on a local wireless network (Airport Base Station) over WPA2, if at all?
    4) And how to set up an ssh-connection over the internet cloud to safely build a remote control/desktop sharing connection, e.g., a friend's Mac when she has a problem?
    Thanks for your consideration.

    First I'm not sure what your goals are.
    1) In terminal-file-"connect to server" you can ask for an ssh connection to be set up. For this to work, do I need to create private and public keys first?
    If you have ssh keys, you can do this without passwords. If you have not exchanged keys with the remote system, you will be asked for the password of the user you are attempting to login as.
    If so, how? Please point me to a reliable and step-by-step instruction site. There are some free ssh-utilities out there, but their documentation is just not helpful enough for a UNIX-dummy.
    Log into the remote system. This could be via ssh.
    On the remote system, run the following command to generate an ssh key for that remote system:
    ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/username/.ssh/id_rsa): <<take default>>
    Created directory '/Users/username/.ssh'.
    Enter passphrase (empty for no passphrase): <<enter nothing>>
    Enter same passphrase again: <<enter nothing again>>
    Your identification has been saved in /Users/username/.ssh/id_rsa.
    Your public key has been saved in /Users/username/.ssh/id_rsa.pub.
    The key fingerprint is:
    aa:bb:cc:dd:ee:ff:gg:hh:ii:jj:kk:ll:mm:nn:oo:pp [email protected]
    This will generate an ssh key for the remote system. This could be any system that support ssh, such as a Unix system, or another Mac.
    Copy the id_rsa.pub file from the remote system to your Mac. When I say "your Mac" I mean the one that you want to make the ssh connection from. The id_rsa.pub is found in the remote system's ~username/.ssh/ directory.
    Append the copied id_rsa.pub to your Mac's ~himbear/.ssh/authorized_keys2 file
    cat id_rsa.pub >>~himbear/.ssh/authorized_keys2
    Now when you ssh to that specific remote system, it will NOT ask for a password. The first time you ssh to any system, ssh will ask if the system is really the system you thing it is. But once you say "yes", it will not ask that question again.
    Repeat for every remote system you wish to log into using an ssh key.
    2) Apparently I managed to connect via ssh once (from the terminal, see point 1) to a local server (allowing remote connection set to ON at the server). But then, when I connected to that server from the client's finder and tried to get into my user account on that server it told me that no secure connection could be established. What's wrong here? Do I have to continue working from within the terminal to use this connection? That would be difficult for an average MacUser.
    MacUser. A flash from the past, as in the MacUser magazine.
    ssh is not used by default when you make connections. If you want an ssh connection, you have to establish it intentionally.
    ssh can be used to pre-establish a tunnel (or tunnels) that other services can use. Once an ssh tunnel is establish, connections to local host's tunnel port will be connected to the specified remote port. For example:
    ssh -L 5901:localhost:5900 [email protected]
    will establish a tunnel that VNC can use. The VNC client would connect to localhost display 1 or port 5901.
    ssh allows multiple -L tunnels to be specified on the ssh command line.
    3) What is the security advantage of an SSH connection on a local wireless network (Airport Base Station) over WPA2, if at all?
    Inside you home. Not much. Unless of course you do not trust the other members of your family. That is to say, others having your WPA2 password, and are thus on the inside, and can sniff you packets.
    4) And how to set up an ssh-connection over the internet cloud to safely build a remote control/desktop sharing connection, e.g., a friend's Mac when she has a problem?
    If you are using the Mac OS X Leopard built-in *Screen Sharing* and you are connecting to another Mac's built-in Leopard System Preferences -> Sharing -> Remote Management (Tiger's Apple Remote Desktop), then in the *Screen Sharing* preferences, is an "Encrypt all network data" option.
    If you wish to set this option in advance, you can launch *Screen Sharing* by double clicking on System -> Library -> CoreServices -> Screen Sharing.app
    You can *Screen Sharing* connections over the net using iChat. This is one of the easiest ways to take control of their system. Of course they need to cooperate. I use a Free AOL Instant Messager (AIM) account for my iChat connections. And as a side benefit you can text, audio chat and/or video chat with the person at the other end.
    If you are NOT using the build-in Mac OS X *Screen Sharing* and/or you are NOT using the build-in remote Mac OS X remote management server, then this is a situation where an ssh tunnel would be a very good idea.
    However, setting up an ssh tunnel between 2 systems across the internet gets complex.
    In this case you might want to consider using something like LogMeIn.com which will deal with all those nasty home routers without needing to to do nasty router configurations, and it will be a secure connection. LogMeIn.com will not be as fast as a *Screen Sharing* connection or a VNC connection, but it will be secure and easy to establish. Again, this is only if you can not to Mac to Mac *Screen Sharing* using built-in Mac OS X remote desktop.
    Now if you want to roll your own ssh tunnels for VNC, then I'm just going to outline the things you need to do.
    If the remote system is behind a home router, you need to configure that remote home router to "Port Forward" port 22 on the Internet side to port 22 on the target Mac. Bonus points if the internet side using a high number port to discourge net bots from knocking on your door. Use the ssh -p 12345 option to connect to the high numbered port that is forwarded to port 22 of the destination Mac.
    On the remote Mac you need to run a VNC server. If this is a Mac, then Leopard System Preferences -> Sharing -> Remote Management (Tiger's Apple Remote Desktop). If it is not a Mac, then for Windows, TightVNC, UltraVNC, RealVNC are possible options. Linux has a built-in vncserver, or you can install x11vnc which has the advantage of displaying the desktop screen.
    Once you can access the remote system, you use an ssh command like the following:
    ssh -p 12345 -L 5901:localhost:5900 remote.system.address
    You can get the remote system's address by having the remote system surf over to http://whatismyip.com. Then they can tell you the IP address.
    If you are going to be doing this a lot, you can get a free no-ip.com or dyndns.org dynamic DNS name for the remote system, and the remote system can run a dynamic DNS client (available from no-ip.com or dyndns.org) which will keep the dynamic DNS name updated as the remote person's ISP change's their IP address.
    Finally, now that you have an ssh tunnel for VNC traffic, you have your VNC client connect to
    Address: localhost
    Port: 5901
    Depending on your VNC client you may need to specify Display 1 instead of Port 5901. Or if you do not get a Display or Port option you specify localhost:5901

  • TS3899 I can't SEND email from Telus account in Alberta, Canada? Does anyone know how to set up the Outgoing server? Help! And thanks!

    Can't SEND email from Telus account in Alberta, Canada, unless I go to web mail. Does anyone know how to set up the Outgoing server? Incoming is fine. Outgoing used to work. We changed it when we went to another location, and can't get it back. Telus support can't fix it. Neither smtp.telus.net NOR mail.telus.net works for Outgoing server to send mail. Please help! Thanks.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • How to set up roaming profile on Macs using AD like in windows

    I can bind the workstations to the domain fine.. But can someone direct me to instructions of how to set up the roaming profiles ?
    What steps do I need on the server ? This is what I've done so far.
    I already have OU's for the departments and the users have a shared folder inside their department folder.... \\server\shared_folder\user
    I have done the usual things with AD as far as the profile settings on the windows server.
    Am currently running Mac OS 10.5 and above
    My windows AD runs on windows server 2008
    All my windows workstation are able to use roaming profile without a problem.
    So far i have tried the so many avenues including..
    Make sure the Mac systems are joined to the domain controller and an ADS user can log on successfully. Use "Directory Utility" under "Utilities" menu to join the system to the domain.
    Backup all the contents from /Users to the storage or somewhere locally.
    Configure automount - Go to "Utilities" -> "Directory Utility" - Select the domain and click "Show advanced options" - Click "Mounts" tab and add automount as mentioned below. Remote NFS URL: nfs://server_name/share_name/path/to/profile/directory Mount location: /Users Additional mount parameters: -P,-T Apply the settings and this will mount the remote shared folder or we can name it as Roaming Profile Space - under /Users directory
    Enable roaming profile - Go to "Utilities" -> "Directory Utility" - Select the domain and click "Show advanced options" - Click "Services" -> Select "Active Directory" and click "Show advanced option" - Click "User experience" tab and select the option "Create mobile account at login".
    Reboot the system and log in as any ADS user. The Roaming shared folder will be mounted and the user profile will be created on the shared folder
    Can anyone kindly assist me

    Hi Guys, anyone with the Soln...or Tips..Am waiting

Maybe you are looking for

  • How do I complain about my broadband service?

    Hi there I'm not sure if this is the right area to be posting; but I hope that someone will be able to help me, as the BT automated system gives you no option to complain, and when you ask to be put through to the complaints department, you get put t

  • Multiple Users on Account

    I'm trying to see how much we would use FormsCentral for our entire company and I can't seem to find an answer on the forum for exactly what I need. We would be using FormsCentral for different departments; Graphics, Accounting, and HR. Each departme

  • HELP my ipod keeps going into restore mode

    hi i have a problem with my ipod touch 2nd generation firmware 3.1.2. it keeps going into restore mode randomly when i play with ir or use it. i upgraded and downgrade and nothing seems to work. i think there is a problem with the hardware! oh and wh

  • Operating System Upgrade

    I have Mac OS X Lion 10.7.5 and wish to upgrade to the latest version OS X Mountain Lion 10.8. How can I do this?

  • No Visible Text (PEv6 on Mac 10.6.8)

    No visible Text in PE v6 on Mac 10.6.8. Other functions appear to work ok. Reinstall of program did not correct. Text may be selected but does not appear on work screen, Would welcome assistance on this. Thanks, Joe Lanier ([email protected])