List of usage examples for javax.swing JFrame getName
public String getName()
From source file:org.eclipse.wb.tests.designer.core.nls.SourceEclipseModernTest.java
public void test_parse() throws Exception { createAccessorAndProperties();/*from w ww.j av a 2 s . c om*/ ContainerInfo frame = parseContainer("public class Test extends JFrame {", " public Test() {", " setTitle(Messages.frame_title);", " setName(Messages.frame_name);", " }", "}"); NlsSupport support = NlsSupport.get(frame); // check that we have DirectSource ModernEclipseSource source; { AbstractSource[] sources = support.getSources(); assertEquals(1, sources.length); source = (ModernEclipseSource) sources[0]; } // check getBundleComment() assertEquals("Eclipse modern messages class", ReflectionUtils.invokeMethod(source, "getBundleComment()")); // check that "title" is correct frame.refresh(); try { JFrame jFrame = (JFrame) frame.getObject(); assertEquals("My JFrame", jFrame.getTitle()); assertEquals("My name", jFrame.getName()); } finally { frame.refresh_dispose(); } }