Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
XChart
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brady James Garvin
XChart
Commits
17a0d9e8
Commit
17a0d9e8
authored
11 years ago
by
Tim Molter
Browse files
Options
Downloads
Patches
Plain Diff
JFrame now accessable from SwingWrapper. See Issue # 44.
parent
6b05dae0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java
+12
-6
12 additions, 6 deletions
xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java
with
12 additions
and
6 deletions
xchart/src/main/java/com/xeiam/xchart/SwingWrapper.java
+
12
−
6
View file @
17a0d9e8
...
...
@@ -73,7 +73,10 @@ public class SwingWrapper {
/**
* Display the chart in a Swing JFrame
*/
public
void
displayChart
()
{
public
JFrame
displayChart
()
{
// Create and set up the window.
final
JFrame
frame
=
new
JFrame
(
"XChart"
);
// Schedule a job for the event-dispatching thread:
// creating and showing this application's GUI.
...
...
@@ -82,8 +85,6 @@ public class SwingWrapper {
@Override
public
void
run
()
{
// Create and set up the window.
JFrame
frame
=
new
JFrame
(
"XChart"
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
JPanel
chartPanel
=
new
XChartPanel
(
charts
.
get
(
0
));
frame
.
add
(
chartPanel
);
...
...
@@ -93,12 +94,17 @@ public class SwingWrapper {
frame
.
setVisible
(
true
);
}
});
return
frame
;
}
/**
* Display the chart in a Swing JFrame
*/
public
void
displayChartMatrix
()
{
public
JFrame
displayChartMatrix
()
{
// Create and set up the window.
final
JFrame
frame
=
new
JFrame
(
"XChart"
);
// Schedule a job for the event-dispatching thread:
// creating and showing this application's GUI.
...
...
@@ -107,8 +113,6 @@ public class SwingWrapper {
@Override
public
void
run
()
{
// Create and set up the window.
JFrame
frame
=
new
JFrame
(
"XChart"
);
frame
.
setDefaultCloseOperation
(
JFrame
.
EXIT_ON_CLOSE
);
frame
.
getContentPane
().
setLayout
(
new
GridLayout
(
numRows
,
numColumns
));
...
...
@@ -129,6 +133,8 @@ public class SwingWrapper {
frame
.
setVisible
(
true
);
}
});
return
frame
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment