<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FSwing_JFC%2FAlignment</id>
		<title>Java/Swing JFC/Alignment - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FSwing_JFC%2FAlignment"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Swing_JFC/Alignment&amp;action=history"/>
		<updated>2026-04-24T02:55:19Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Swing_JFC/Alignment&amp;diff=7415&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Swing_JFC/Alignment&amp;diff=7415&amp;oldid=prev"/>
				<updated>2010-06-01T06:44:36Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:44, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Swing_JFC/Alignment&amp;diff=7414&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Swing_JFC/Alignment&amp;diff=7414&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Laying Out a Screen with Different Component Alignments ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import java.awt.ruponent;&lt;br /&gt;
import javax.swing.BoxLayout;&lt;br /&gt;
import javax.swing.JButton;&lt;br /&gt;
import javax.swing.JFrame;&lt;br /&gt;
import javax.swing.JPanel;&lt;br /&gt;
public class AlignY {&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    JFrame frame = new JFrame(&amp;quot;Y Alignment&amp;quot;);&lt;br /&gt;
    JPanel contentPane = (JPanel) frame.getContentPane();&lt;br /&gt;
    BoxLayout layout = new BoxLayout(contentPane, BoxLayout.X_AXIS);&lt;br /&gt;
    contentPane.setLayout(layout);&lt;br /&gt;
    JButton button = new JButton(&amp;quot;0.0&amp;quot;);&lt;br /&gt;
    button.setAlignmentY(Component.TOP_ALIGNMENT);&lt;br /&gt;
    contentPane.add(button);&lt;br /&gt;
    button = new JButton(&amp;quot;1.0&amp;quot;);&lt;br /&gt;
    button.setAlignmentY(Component.BOTTOM_ALIGNMENT);&lt;br /&gt;
    contentPane.add(button);&lt;br /&gt;
    button = new JButton(&amp;quot;0.5&amp;quot;);&lt;br /&gt;
    button.setAlignmentY(Component.CENTER_ALIGNMENT);&lt;br /&gt;
    contentPane.add(button);&lt;br /&gt;
    frame.setSize(200, 100);&lt;br /&gt;
    frame.show();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Working with Component Alignments ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import java.awt.ruponent;&lt;br /&gt;
import java.awt.Container;&lt;br /&gt;
import java.awt.FlowLayout;&lt;br /&gt;
import javax.swing.BoxLayout;&lt;br /&gt;
import javax.swing.JButton;&lt;br /&gt;
import javax.swing.JFrame;&lt;br /&gt;
import javax.swing.JPanel;&lt;br /&gt;
public class AlignX {&lt;br /&gt;
  private static Container makeIt(String labelChar, float alignment) {&lt;br /&gt;
    JPanel container = new JPanel();&lt;br /&gt;
    BoxLayout layout = new BoxLayout(container, BoxLayout.Y_AXIS);&lt;br /&gt;
    container.setLayout(layout);&lt;br /&gt;
    for (int i = 1; i &amp;lt; 6; i++) {&lt;br /&gt;
      String label = makeLabel(labelChar, i * 2);&lt;br /&gt;
      JButton button = new JButton(label);&lt;br /&gt;
      button.setAlignmentX(alignment);&lt;br /&gt;
      container.add(button);&lt;br /&gt;
    }&lt;br /&gt;
    return container;&lt;br /&gt;
  }&lt;br /&gt;
  private static String makeLabel(String s, int length) {&lt;br /&gt;
    StringBuffer buff = new StringBuffer(length);&lt;br /&gt;
    for (int i = 0; i &amp;lt; length; i++) {&lt;br /&gt;
      buff.append(s);&lt;br /&gt;
    }&lt;br /&gt;
    return buff.toString();&lt;br /&gt;
  }&lt;br /&gt;
  public static void main(String args[]) {&lt;br /&gt;
    JFrame frame = new JFrame(&amp;quot;X Alignment&amp;quot;);&lt;br /&gt;
    Container contentPane = frame.getContentPane();&lt;br /&gt;
    Container panel1 = makeIt(&amp;quot;R&amp;quot;, Component.RIGHT_ALIGNMENT);&lt;br /&gt;
    Container panel2 = makeIt(&amp;quot;C&amp;quot;, Component.CENTER_ALIGNMENT);&lt;br /&gt;
    Container panel3 = makeIt(&amp;quot;L&amp;quot;, Component.LEFT_ALIGNMENT);&lt;br /&gt;
    contentPane.setLayout(new FlowLayout());&lt;br /&gt;
    contentPane.add(panel1);&lt;br /&gt;
    contentPane.add(panel2);&lt;br /&gt;
    contentPane.add(panel3);&lt;br /&gt;
    frame.pack();&lt;br /&gt;
    frame.show();&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>