Java labels crossing each other [duplicate] - label

This question already has answers here:
How to locate JLabels to an absolute position on Java GUI
(3 answers)
Closed 7 years ago.
Is there any way to put JLabels one top on other? Trying to make a card hand representation in Netbeans. I am using JLabel icon for each card. Like you have 1st card (label) on top, then next one a bit right and down from the 1st card and etc. Netbeans form designer does not allow to make intersections of JLabels. Just put the label next to another one.

I found the solution in JLayeredPane

Related

How can I save an image in Python? [duplicate]

This question already has answers here:
How to capture pygame screen?
(4 answers)
Closed 5 years ago.
I've made a really basic drawing program in Python with Pygame. The program has a square window, in which you draw. How could I save the area inside the window as an image?
As downshift commented, use pygame.image.save
win = pygame.display.set_mode(...)
# your stuff
pygame.image.save(win, "screenshot.jpg")

Adjusting the content to fit on every Iphone [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
i can't manage to adjust all my content on the iphone 6s aswell as on the iphone 4.. on the iphone 6s the label font size is very small compared to the screen size, and on the iphone 4 not all of the content fits on the screen.
I tried solving this problem using auto layout, but there is no difference between the iphone sizes. only between ipad and iphone landscape and portrait..
i dont want to adjust this with code, is there a way to do it in the storyboard?
You can't use Size Classes to distinguish iPhone 4 vs iPhone 5.5. Size Classes can only distinguish these cases (see picture below). You must check the specific screen size in you code
Are you familiar with auto layout and constraints? You do not have to open every simulator to see how does it look on different devices. And you can do it in storyboard.
You can open Storyboard -> click on the assistant editor -> Now where it says "Manual"
enter image description here on the upper thing click on "Preview"
And now you can mess around more easily with constraints and see right after change how it looks like on different screen sizes.

Emojis in Segmented Control [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have emojis used in the different segments for my Segmented Control. When I select a segment, the selected segment highlights (indicates which one was selected), and the emoji suddenly becomes all white. Is there anyway to fix this issue? Thanks!
I use follow code and it worked for me.
OC:
[segmentedControl setTitleTextAttributes:#{NSForegroundColorAttributeName:[UIColor whiteColor]} forState:UIControlStateSelected];
Swift:
let segmentedControl = UISegmentedControl(items: ["😊","😢","moon"])
segmentedControl.setTitleTextAttributes([NSForegroundColorAttributeName:UIColor.whiteColor()], forState:.Selected)
I believe this is because the coding for emoji is not compatible with UIViews.
What you can do is select Momentary for the State. It will still disappear on click but will quickly come back.
Unfortunately the segment won't stay hilighted blue like you probably want though.

How to resize font on all slides at once in Powerpoint 2010? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have created a bunch of slides in Powerpoint 2010, and all attempts to resize the text on ALL of them at once, have failed.
I have tried using the "master" slide and it does allow me to change the color and position of the text element on all slides, but despite the master slide showing the intended font size, the real slides do not.
How can I resize the text on ALL 55 of my slides at once in Powerpoint 2010?
Simple solution that I just figured out. Once you've changed the master, go to each slide and click "reset" on the home bar to force those changes. One click per slide and you're done.
You can also select all the slides and then click on Reset. Works like a charm :)
You are able to do this with a master slide. I believe you may be using them incorrectly. You create a master slide, then fill in the empty text boxes that are created in the slideshow.
At this point, you may be able to resize all of the text by going into outline view, selecting all of the text, and resizing. You should be able to select individual lines of text as well, and adding to the selection by holding CTRL, and selecting more lines. Then you can, for example, resize body text, and header text.
UPDATE
I tried this and it works.
Changing the master only affects text in placeholders and then only if the user hasn't selected and formatted the text differently from what the master dictates.
Random text on slides has no connection to the master, so changing the text size on the master won't help.
A macro to change all the other text sizes wouldn't be too hard to write if you just want to make all the text xx points, but it takes quite a lot more work to do a proper job of it (adjusting the text spacing and such rather than just the text size).

displaying waveform in xcode [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
rendering a waveform on an iphone
Efficient method to draw a line with millions of points
Can anyone please help me with displaying the waveform of an audio file in xcode?
Actually, I've recorded an audio through AVAudioRecorder class. Now, I want to get the waveform of this either while the audio is being recorded OR use the .caf file it saved.
Please?
Thanks :)

Resources